Can no longer ignore certificate errors during publishing in VS2012 - deployment

I've been using the MSDeploy publishing service from Visual Studio to publish my projects. The publishing URL is https://machinename.domain.com:8172/MsDeploy.axd. It worked fine in VS2010 -- I was able to check a checkbox that said ignore certificate errors. That box is no longer shown in VS 2012. I found a post indicating that I'm supposed to get prompted about whether to ignore certificate errors -- but I'm not and I can no longer publish my project. Any ideas?

Open your publish profile from /Properties/PublishProfiles/<Profile>.pubxml and add the following line within the PropertyGroup element:
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>

Related

Nuget Server issue post migration to Win 2016

I have migrated nuget repository from Win 2008 to Win 2016.
Alias to that server: http://xyz.mycompany.com/NugetFeed
Apart of windows, IIS is different as well, on the new server it is IIS 10.
After migration, nuget works pretty well, except one function. I can browse packages via web (http://xyz.mycompany.com/NugetFeed) or via Visual Studio etc. Visual Studio can see packages created manually.
The only problem is with the nuget push.
>nuget push FEDivaNET.dll*.nupkg -Source http://xyz.mycompany.com/NugetFeed/ D568CD48-1609-40C9-9A5D-7ADC808129E5
Pushing FEDivaNET.dll.3.41.73.nupkg to 'http://xyz.mycompany.com/NugetFeed/'...
PUT http://xyz.mycompany.com/NugetFeed/
NotFound http://xyz.mycompany.com/NugetFeed/ 128ms
Response status code does not indicate success: 404 (Not Found).
System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<PushPackageToServer>b__23_0(HttpResponseMessage response)
at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__181.MoveNext()
It is not a problem with the URL. When you try to modify URL then you will get different error
It is not a problem with permissions to D:\MyServer\NugetPackages on server, as I have set full permissions to that folder. I have also moved packages folder to different locations (ie. some other external network drive), but I am having same issue.
I tried compiling 2 different Nuget.Server versions: 2.14.0 and 3.1.2 ...Same exception.
Inside IIS, I am pretty sure I have set same settings as on the old server. Also I have INTEGRATED pipeline mode, so everything is good. I also tried setting authentication via technical users etc.
Not sure where is the issue, I think I checked every single setting. I tried with APIKEY, and without APIKEY. I modified every single setting in the Web.config, no luckā€¦..
The url on which push the nuget packet is something like
http://{server}/{feed}/api/v2/package
So in your command use:
nuget push FEDivaNET.dll*.nupkg -Source http://xyz.mycompany.com/NugetFeed/api/v2/package
Documentation : Publish a package
When you create website in IIS 10, then by default PUT verb is not allowed.
This can be set here:
IIS -> YOUR WebSite -> Request Filtering -> HTTP Verb tab: **Set PUT verb**
This has fixed an issue.

Office.JS "This add-in is no longer available" error

Suddenly I started getting an error while loading an add-in:
Error : "This add-in is no longer available: addin inserted during development are only available during debugging from visual studio. Please open your project in visual studio and re-run your application or deploy your add-in into a valid catalog and reinsert."
When I used to run the project the addin used to load automatically. Now I am getting above error.I haven't made any changes to code and word.
Note: I have installed Fiddler today but after that add-in was working. I have reset my add-in but no use.
I was not able to resolve this error. As a workaround I have created new project copied only home.html,home.js and other JS and CSS files and it works.
I also had this error recently in O365 Excel on Windows 10 but not in O365 Excel Web. In the end I solved it this way:
I ran npm run validate
This gave me a list of validation errors for the manifest.xml
I fixed the validation errors (In my case some String ids were too long)
I (re)started dev server npm stop npm start
So it seems like O365 Excel Web can cope with invalid manifest.xml to some extend whereas the app has a strikt validation of the file. I wish Office would output a meaningful error message in stead of a missleading "This add-in is no longer available". This did cost me roughly 6 hours to find out...
I had this error not for studio code but with excel but it is kind of linked
I put the staging manifest that does not contain localhost url (this was the error return during validation)
and I replace then one by one with dev config even at the end I put back localhost and it works so there is a kind of cache somewhere but I did empty the cache.
between each step I click on the drop down of Excel insert/my add in arrow and the app name under developer add in

Error when opening Word document that was created by VSTO Template

I have created a new Visual Studio Word 2010 Template project, now I want to deploy it using a Windows Installer setup.
I followed this tutorial using Visual Studio 2012 with InstallShield 2013LE.
After installing the setup and opening the Word Template, it seems to work fine. However, after saving the template as *.dotx-document and opening it again the Installing Office customization dialog appears.
The message says There was an error during installation: Downloading file file:///[Path to the dotx file]/WordTemplate.vsto did not succeed.
To check whether I've made an error creating the setup and registry entries, I also tried Advanced Installer 10.9 Office Add-In setup, that creates the required entries automatically. It also fails with the same error message.
There is nothing special about the VSTO Addin. I started a new project for testing purposes, that adds a ribbon and a header to the Word Template file.
Finally I tried the built in Click-Once installer, with success, newly created documents can be opened without any exception. But it comes with some limitations. I would like to add some files and let the user choose the installation path, what doesn't seem possible.
So what am I missing to deploy my VSTO AddIn?
I believe that such a problem is coming from proxy server issues. The proxy server on the client machine is blocking the download of your vsto file that is considered as an executable file.Unfortunately the only solution I see was stipulated in an old post proposing to zip your installer and to send it to users ( which is not optimal, I must agree).
You must also run a command to clear the app cache any time you deploy (from your windows console):
rundll32 dfshim CleanOnlineAppCache
Hope that helps !

NuGet is returning 503 Server Unavailable

Is there a way to load a package from an alternative server when Visual Studio Package Manager (NuGet) is responding with a "The remote server returned an error: (503) Server Unavailable" message?
This is an obscure condition that will likely only occur on an "enterprisy" network environment. If these conditions apply you:
you are required to access the Internet via an HTTP proxy server
the HTTP proxy server requires a valid user ID & password (or AD authentication) to allow requests to proceed
you've been messing with cool developer tools that were ported to Windows from a Linux/Unix environment
the new cool tool(s) work after adding the HTTP_PROXY (or possibly HTTPS_PROXY or both) environment variable(s)
you can access the NuGet servers from a browser without getting a 503 error
Then it's likely you broke NuGet by inadvertently invoking this configuration feature. I'm not sure exactly how the environment variable breaks NuGet but I suspect NuGet is detecting & using the http_proxy URL but sending an empty user ID & password which causes the HTTP proxy to reject the request.
Fix: remove the environment variable(s) you added and see if the cool tool can be configured to use an HTTP proxy without them.
Update: Ran into a version of this issue with the NuGet config file referenced in the "this configuration feature" link above. Open this file:
%appdata%\nuget\nuget.config
in your favorite editor. If it contains elements with http_proxy or https_proxy then removing these elements may fix the issue too.
PS: Hopefully I'll get an up vote from Colonel Panic :-)
If you have used the package in the past it is probably in your cache. You can add the local cache as an available package source by going into the Library Package Manager Settings under the Tools menu in Visual Studio. For Visual Studio 2012, choose Tools, Library Package Manager, Package Manager Settings, and then click on Package Sources.
In the Available package sources section, type a name like "Cache" and then in for the source, browse to %LocalAppData%\NuGet\Cache. You may need to use Windows Explorer to translate %LocalAppData%\NuGet\Cache into the full path (usually C:\Users\YourAccountName\AppData\Local\NuGet\Cache).
Once you have the Cache as an available source, you can now use the Package Manager Console (found under the View menu under Other Windows or also under the Tools menu under Library Package Manager).
From the Console (which is a PowerShell window with commandlets for NuGet) you can type "get-help NuGet" to see available commands.
Then using Get-Package, you can get a list of Package ID's. Make sure the "Package source" is set to "Cache" (or whatever you called it) and the Default project is set to the project you need manipulate, both of these are dropdowns located at the top of the Page Manager Console. You can also use the Get-Project to verify you are working against the correct project in your solution.
Finally, you can type Install-Package and when prompted enter the Package ID from the output of the Get-Package commandlet.
i had also this problem, it was becouse of my network.
if you have any blocking on your Internet, (like in companies internet or etc..)
you may not allowed to download the nuget package.
try to download the package in another network, maybe it can help you!
Talbott's answer did not work for me, as my cache was empty. However, if you have used the package in another solution, you can copy the items you want from the "packages" folder in the other solution to a packages folder in your target solution.
If you have no packages installed in the target solution, you may need to add the following to a repositories.xml file in the packages folder:
<?xml version="1.0" encoding="utf-8"?>
<repositories>
</repositories>
After doing that, the packages appeared to be installed in my solution and I was able to add them to projects.
Additional Note: I had to use the "Manage NuGet Packages for Solution" option at the solution level to add the package to individual projects. Using Install-Package from the console still returns a 503 even though the packages is already installed in the solution.
You can also get this error if you are using a VPN client (e.g. Cisco AnyConnect) and you have recently renewed your VPN certificate. The issue can occur after you have updated your certificate, but before you have rebooted. A reboot resolves the issue.
It is a pretty old question, but I have just encountered the same problem. In my case it occurred because I had more than one nuget package source configured in the Visual Studio Package Manager. In my company we use NuGet to get mainstream packages and MyGet for our own stuff.
When I attempted to pull a pretty big package it failed with a 503 code and the error link looked pretty odd, it had MyGet in it istead of NuGet. Turns out Visual Studio package manager tried to pull it from another source despite having NuGet chosen as a current source. Disabling other sources and then proceeding with a download fixed it.
Hopefully it will help somebody who stumbled upon this thread just like I did.
Another possible reason for recieving 503: If you're using Azure DevOps feed, then NuGet packages are limited to 500 MB.

ClickOnce error after deploying -- has a different computed hash than specified in manifest

Afer deploying my VSTO add-in with ClickOnce, I get the following error message when trying to launch setup.exe:
File, Addin.resources.dll, has a different computed hash than specified in manifest.
Why is this happening? What can I do to fix this?
I was able to resolve this just by doing a clean build and publish. For some reason the manifest wasn't updated like it was supposed to.
I know this is super old, but putting it here for anyone who comes by in search of an answer.
It is described on https://learn.microsoft.com/en-us/previous-versions/dd465291(v=vs.110)?redirectedfrom=MSDN. I'm adding the main commands here in case the page disappears.
You can add a few commands on your build server to resign the manifest. After publishing, execute each command inside the folder containing the manifest and the vsto, respectively.
mage -sign ExcelWorkbook.dll.manifest -certfile ExcelWorkbook_TemporaryKey.pfx
mage -update ExcelWorkbook.vsto -appmanifest "Application Files\Ex
celWorkbook_1_0_0_0\ExcelWorkbook.dll.manifest" -certfile "Application Files\ExcelWorkbook_1_0_0_0\ExcelWorkbook_TemporaryKey.pfx"
I'm using Visual Studio 2013 SP2, and am having the same issue.
Regularly, I will create a new release of our Excel Addin by Rebuilding the solution in VS, signing it, deploying it, but it is uninstallable.
If I then quit Visual Studio, then run Visual Studio again, Rebuild and Redeploy, then it'll work without any problems. Which is fine... but, of course, it means each time I deploy, I need to check that the damn thing will install okay !
It's worrying that VS continues to build installables which quietly contain this issue.
There are plenty of articles mentioning this bug, errr, issue (some from 8 years ago !!), suggesting I need to "rebuild my manifest file", but why doesn't this happen automatically when a do Rebuild in Visual Studio..?
ClickOnce Deployment Issue
ClickOnce Deployment Error
It is super simple, just go to your Project directory and delete bin and obj directories, after that compile your application again.
For me it was the solution.