Deploying to Azure from Visual Studio fails when connecting - visual-studio

I have been using Visual Studio to deploy a Web Service to Azure; downloaded my publish profile to enable that and it was working fine for the past few weeks.
Today I tried to deploy an update and now all my deployments fail with the following:
17:25:03 - Preparing deployment for WindowsAzure1 - 25/03/2013 17:24:53 with Subscription ID 'xxx' using Service Management URL 'https://management.core.windows.net/'...
17:25:03 - Connecting...
17:25:04 - Object reference not set to an instance of an object.
17:25:04 - Deployment failed with a fatal error
I'm not sure what's failing here; is this saying it's unable to connect to the Service Management URL?
Last week I installed an SSL certificate on Azure and now I'm not seeing the option to download my publish settings. I know it used to be there but isn't now. Does having an SSL prevent me from somehow connecting to the management page?
Edit
Before leaving work I removed the certificate but when I then checked for the PublishProfile it was still not showing.
The PublishProfile is not available for any of the other users attached to the subscription - so I don't think it's related to my login.
Edit 2
A bit more drastic; I've now tried deleting my storage and service, to start from scratch. I created a new publishsettings file by removing the subscriptions already imported into Visual Studio and then following the link to "Sign in to download credentials". Next I created a new service and storage in Azure and tried to publish but the deployment still fails when connecting with
Object reference not set to an instance of an object
I have no idea what else I could try or what could be wrong, or where to look to find out.

I got the same error today. Why it wasn't working was because I hadn't uploaded the certificate in the managementportal prior to the publish.
After adding the certificate, everything worked just fine!
You can read more here: http://www.amido.co.uk/mark-omahoney/publishing-in-windows-azure-object-reference-not-set-to-an-instance-of-an-object/

The best way to solve above problem is to download the latest PublishSettings from Azure Management Portal and then use it with Visual Studio. This way your connection to Windows Azure Management Portal from local machine will be verified and validated. Once you have the basic connection working then you can publish your application to specific Windows Azure Service.
Also you can log into your Azure Management Portal and remove all old management certificates which are added in previous publishsettings download attempts.

The problem, in my case, was that my solution Cloud project had the thumbprint of the SSL certificate I'd uploaded in its ServiceDefinition.csdef and ServiceConfiguration.Cloud.cscfg. In my first edit I said that I'd removed the certificate from Azure, but hadn't then removed it from the project files; commenting them out allowed me to publish from Visual Studio again.
I'm not sure why this happened though, I had uploaded the certificate to Azure and was able to connect to my service on https in FireFox so the SSL was "working".

Web Deploy v3.6 BETA3 was released that fixes this issue. To resolve this error, you can download the Web Deploy beta and patch your VS2013 installation. http://azure.microsoft.com/blog/2014/08/11/web-deploy-3-6-beta-released/
Test Validate Connection once you installed the above Web Deploy. If it works, then fine else you can modify the proxy settings used by msbuild.exe (msbuild.exe.config) and check you can now publish from behind a proxy with Web Deploy.
Regards,
Logesh Shan

I think the certificate got corrupt. Deleting the solution .suo file and the .ccproj.user file in my Azure project did it for me.

Related

How to provide password for Web Deploy on Visual Studio (Mac)

Environment
MacOS 10.14.6 Mojave, Visual Studio For Mac v8.7.9
API service built on .NET Core framework
Issue: I have a .NET Core project that has a web deploy publish profile to deploy updates to the windows server running on EC2 (IIS).
When I was working on windows, I could easily deploy it through the web deploy UI in the visual studio but after I migrated to the macOS, cannot find such option in the visual studio. I can click on the existing web deploy publish option but it always fails because I need to provide the password somewhere. I tried to add <Password> under the pubxml file but it doesn't read as a valid tag.
Existing publish profiles
Error
/usr/local/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Web deployment task failed. (Connected to the remote computer using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)
/usr/local/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
/usr/local/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Error details:
/usr/local/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : Connected to the remote computer ("ec2-3-92-105-216.compute-1.amazonaws.com") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
/usr/local/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk.Publish/targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets(140,5): error : The remote server returned an error: (401) Unauthorized.
Publish failed to deploy.
Currently I have not yet found the answer for that but I've found a kind of work around.
I publish the project to a folder (be careful with dotnet parameters) and after that manually copy files in "bin/Release/netcoreapp3.1/publish" v. ftp to my server.
In order to save a lot of time, it makes sense to copy only newer / different size files.
Not elegant at all, but this is the way how it works for me now.
Will be happy to hear, someone found a solution how to store the password for webdeploy on MacOS

Unable to publish to Azure: Web deployment task failed

I have been deploying my Web Service via Visual Studio for over a year. Today it suddenly started giving me the error: Web deployment task failed.
Things I have noticed:
I have two other projects in the same solution that deployed to Azure without an issue.
I am able to download and change files via Cloud Explorer in VS.
I cant preview changes.
Validate Connection fails.
Things that I have tried:
Reset the publish profile via Azure, downloaded and imported it.
Selected an existing App Service.
Ensured that WEBSITE_WEBDEPLOY_USE_SCM = false before downloading the latest
publish profile.
Manually typed in the Username, Password from the Deployment Center
Hopefully someone can see something I am missing.
I was finally able to publish after a few weeks and plenty of back-and-forths with Azure support. I'm not sure if it was just time that fixed the problem, but the last thing I did before it started working was Attach a Debugger to the App Service. Hope that helps!

Login into my deployed Umbraco back office is causing "An error has occurred.". How do I find out what is wrong?

I have deployed my Umbraco installation by using Visual Studio and the regarding nuget package version 7.4.1 and I am using Azure DB as a back-end. When I try to login I get the following message:
The logs in the folder "/site/wwwroot/App_Data/Logs/" do not show anything. Using http or https does not make any difference.
When I start Umbraco from within Visual Studio (connected to my Azure DB back-end) in debug mode the login works perfectly:
How can I find out what the issue is?
Connecting to the backend with Open Live Writer helped me to unveil a detailed error message. By mistake I have deleted one of the caching folders (App_Data\TEMP\PluginCache).

Visual Studio hangs when creating Azure App Service

I'm trying to follow a tutorial on Azure deployment. I'm stuck on one of the first steps creating the App Service. It seams that the form tries to find all App Service Plans but can't, so all of Visual Studio hangs. I had to kill it with Task Manager. Any clues on how I can fix this? Do I need to create something at the Azure management console?
Had the same issue, turned out I hadn't installed Azure SDK, you'd think there would be some kind of error message, but no. Installing the SDK fixed issue
I did the steps below to resolve the issue.
Login to your Azure account
Manually create an app service (use any dummy app service name). The service plan and resource group will be created while you're creating this app service
Once you see the dummy app service created on your Azure dashboard (it will take around 1-2 minutes), open your visual studio from your pc, create your web project and check api service
--- This time, the service plan and resource group will be brought in.---
Click "Create" to create your "real" web/api project in Azure
Now you can remove the dummy service from Azure
I had the same problem. It started to work after I logged into the Azure Dashboard and manually created an App Services Web App.
Ran into the same issue a few days ago and here is how I got it working.
I had yet to create any App Services in the Azure account I had tied to Visual Studio and when I got to the Create App Service window you posted, Visual Studio would freeze.
I logged into the Azure Portal, created an App Service with a different name than the project. Once it was created, I then deleted the newly created App Service.
After doing this had no problem freezing in Visual Studio. The fix appears to be to create at least one App Service in portal before it works in VS.
I did two things at once, not sure which one got through the lock up.
1) In Visual Studio, went to File -> Account Settings then under the "All Accounts" section of the Account Settings window I reentered my credentials for the Azure account I had linked the project to. This account had a notification raised saying "We need to refresh the credentials for this account."
2) As others have said, I created a new Web App. I'm not sure this was the problem, however - I had previously created a couple other web apps and these resources were still present in my dashboard.
I have to agree with the above comments, too - the error messages provided for this are really, really poor.
Check that there are no characters that it will not accept. For instance an underscore '_'
Azure built a dummy name for me to use including an underscore which it does not accept. It was trial and error for me to find this where a simple warning would have saved lots of time.
Login to Azure Portal and create necessary resources. VS screens do not seem to work properly.
I created Api App on azure portal and my problem solved.
Same problem, however I have 3 Azure subscriptions, but even after making sure all of'em has at least one App Service it still hangs on this step. No other option than to not check the option to host.
Updating Azure SDK on VS2015 fix the problem in my case

Issue while creating TFS Team Project

I’m doing a VSS to TFS upgrade for my team. We have configured the TFS server, now I’m trying to create a Team project on the server from my local VS2013 and I get an error as in the attached picture.
I have Farm administrator rights on SharePoint site, Full admin access to the Collection where I’m trying to create the Team project, Content Manager Rights on the Reports Folder.
I have cleared the TFS cache on my local as well.
Can you please help me out if I’m missing anything?
If you configured TFS to have Reports, it tries to create a folder in Reporting Services and populate with some pre-canned reports.
The error says that it is not able to find the machine with Reporting Services. Review the configuration at the console, if you can ping the machine, if port 80 (or another if you changed default) is reachable.

Resources