Visual Studio hangs when creating Azure App Service - visual-studio

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

Related

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!

Change deployment slot for published API App in Visual Studio

I have an existing Web API project published as a 'API App' on Azure. I recently added a "staging" deployment slot that I'd like to publish future versions of the API App before Swapping over to production. However, if I try to create a new publish profile in VS 2015 (or 2017), all my Web Apps are listed except the API App - so there is no way to select the existing deployment. Put this another way, if I delete the publish profile I have no way to publish the project using the Publish wizard (unless I download the publish profile from Azure, but I still have no way to change the deployment slot - that I know of).
I can see my API App in Cloud Explorer OK.
Any ideas?
I think you should be able to go to "deployment slots" in your web app click on a staging slot and then on the right side you will have your staging blade and then ou can download publish profile that is specific to staging slot:
According to your first screenshot, we could find that there are multiple resource groups in current subscription, but you just check the API App in resource group InergySystemsMain, please make sure if the API App belongs to other resource group.
Besides, as RAS said, we could download publish profile of Azure app service from Azure portal to local, and then we could import this publish profile file in Visual Studio.

Azure Portal missing Web App

I have a number of web apps hosted in Azure. These can be navigated to by their URL and are live and running correctly. If I use the server browser in Visual Studio 2015 I can see the correct web apps... AND previously deleted web apps.
However in the new Azure portal one of my web apps is missing. What do I need to do to get the new portal to recognise all of my web apps and should I be worried about visual studio displaying old deleted ones?
This is a sync issue that happens occasionally, and that we can fix for you. In order to do this, please share the name of any site in your subscription. You can create a temporary dummy site for that purpose if you like.

How do I deploy an existing web app project to Azure using Visual Studio but no Azure Emulator?

I have an existing project with three web apps (two web API and a front end). I would like to deploy to Azure all three with a single click of Publish using the Publish Web wizard.
I installed the Azure SDK and tried to create a new Cloud Service, but this install the VMs and the storage emulator, that I don't need at all and slows down my PC.
I tried with Azure Resource Group to add to an existing project, but the Deploy button remains disabled, like it failed to connect to the web site project.
What is the recommended way to do this?
I am using Visual Studio 2015
Thx.
You do not need to install the emulator for the deployment to work, just download the parts you need from http://www.microsoft.com/en-us/download/details.aspx?id=48178 (assuming you want SDK 2.7).
It's not really clear from your question if you want to deploy a Cloud Service or a Web App. If you want to deploy a Cloud Service, you can add all 3 projects as roles and they will all be published within a single deployment (just one click to Publish). But, if what you want is to deploy them as web apps, you will need to do it in 3 different apps, which means 3 clicks to publish.

Deploying to Azure from Visual Studio fails when connecting

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.

Resources