Azure Websites Deployment Task Failed - asp.net

I am hosting a website on Azure Websites, and starting around 10AM CST today, I have been unable to deploy for the following reason
Web deployment task failed. (Could not connect to the remote computer ("waws-prod-chX-XXX.publish.azurewebsites.windows.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.)
On top of that the site keeps giving a 502 gateway error (after 5 minutes), BUT the Azure dashboard shows everything is up: http://www.windowsazure.com/en-us/support/service-dashboard/
I use the Standard Mode on a Small VM which I share between 3 other sites, the other sites are all fine, and I can publish to them, just not this one. They all have the same web deployment server.

In my case I experienced the same error, and did not see anything wrong in the console. Then right as the hour turned over, I was able to do it again.
There must be some setting that only allows X number of WebDeploy resources to be used per hour.

Related

IIS 8 publish ASP.NET core application - file in use

Is it possible to publish an ASP.NET (core) application to a running site on IIS 8 without having to stop and start the website manually?
Visual Studio 2015 keeps giving the error that a file is in use. I'm using publish to the file system, because my Web Deploy to a server in our network fails at the end with an error that it cannot authenticate on the server with port 443.
I don't mind IIS having to recycle the application pool, but when I constantly have to put the app down, publish (which takes about a minute) and restart it, it's not really good for the users.
Another option would be something like 2 websites running the same application, but only if this is automatable. Then it would put down 1 of the 2, update this, put it on, put down the second, update this and start it.
A third option is something like a hot update, where I could just update the application while it being on.
Can anyone point me in the right direction (perhaps some blog posts), because my Google searches didn't give me any good information?
If you copy a file called app_offline.htm to the application folder IIS will gracefully stop your application and start serving the contents of the app_offline.htm file. When application is stopped you can copy your files. After files are copied remove the app_offline.htm file and IIS will start your app. VS does that for you when you deploy to Azure but not when deploying to file system.
You mention "two websites running the same application". Do you mean two web servers hosting the same app?
If you already have multiple web servers (a.k.a. cluster of servers, or web farm), you can simply take some servers out of the cluster and update them. That is how we push out our updates. We use software from Citrix for managing the server farm. It also handles load balancing. This type of software allows one to monitor the servers, so you can determine when all the users have "moved" off the web servers (that were recently taken out of cluster). Then you can iisreset, deploy the new build, and move on to the next server (or set of servers, depending on your configuration). We have more than 20 virtual web servers. Typically we take down half of the servers, update them, and take the other half down as we put the first half back in the cluster/farm. This should allow for uninterrupted service. I understand you want to automate the process. I'll assume you're using Windows NLB (network load balancing). You could write a PowerShell script to automate taking down the servers. Here's a reference:
https://technet.microsoft.com/en-us/library/ee817138
I understand this may be viewed as a workaround. I'm not sure if recycling the app pool is always necessary with ASP.NET Core. I wasn't able to find a definitive answer. Most production applications should be on more than one web server anyway. Even if you don't have a lot of users, you should have multiple web servers for failover purposes.

Application Insights is showing no data at all

I am experimenting with Application Insights (v0.14.0) and an ASP.NET application that I maintain, and I am finding its data collecting to be quite erratic. For a while, I was only getting client-side data being published (e.g. Browser Page Load Time) but none of the server metrics. I checked that the ApplicationInsights.config file was in both the web root folder and in the bin folder as per Application Insights not showing data in Azure Preview Portal, and that the correct instrumentation key was being used. We are not currently running the AI agent application.
Last night we deployed a new version of our application, without changing the AI configuration, and suddenly the server metrics started coming in. Hurrah! Unfortunately, 45 minutes later we deployed a single assembly hotfix to the application, and after the app pools had been recycled, the server metrics stopped, and this time the client metrics stopped as well.
Opening up the web application in my browser, I can see the AI.js script being loaded, and looking at the outbound network calls, I can see the telemetry being successfully submitted to AI:
Remote Address:23.101.207.84:443
Request URL:https://dc.services.visualstudio.com/v2/track
Request Method:POST
Status Code:200 OK
Any ideas what's going on?!
Unfortunately yesterday we had issue in the pipeline, that was causing latency of upto 4 hours. You can always get information on the service at http://aka.ms/aistatus. We are still working through some of the issues, but they are mostly resolved.

How to host multiple WebSites on same IP and Port in IIS 7?

I'm working asp.net web based application, I have deployed this application on server, Its getting response on port 80 from a outside client. I want the to fix the bugs so I want to run this application in Debug mode so that I can attach the worker process with the application and this is making the Performance down and its disturbing the QA team. So can I have two application one can run in release mode so that QA activity does not get disturbed and parallelly I can debug the build and fix the bugs or can do further development. I'm facing the same problem during the development activity, If multiple developers are working paralley , only one is able to debug the application other one has to wait. So please suggest me, If I can get rid of this situation.
I have only one server on which I can test this application.
So My requirement is how to host multiple websites on single ip and port.

Changing Web Service from Localhost to Server

I've got a small WCF service I've created.
I can edit it and get it working great on the localhost, but my PC is not where this application is going to be run from. It is going to run on our Server.
However, every time I try making any kind of change to the project that points it to our server, the entire project goes to crap: I can no longer view the project in a browser and my test console application can not connect to it. I try changing it back to using the local IIS web server, but then the local machine does not start up IIS whenever the project is started so it doesn't work either.
I can debug and troubleshoot for a day or so to get it working again on the local machine, but then I'm back to Square 1 where I need to deploy my application onto our Server.
This is freakin' maddening!
My project works, but I can't seem to get it from Localhost to a real Server.
All the examples I find online show how to do this using Localhost. Does no one ever deploy their projects?
Where is the Guide for getting me from Development stage to Deploy?
Some nice tutorials here
http://www.dotnetspider.com/forum/193466-Deploy-Wcf-service-IIS.aspx
http://wcftutorial.net/WCF-IIS-Hosting.aspx
also on SO Deploy WCF Service to IIS when it only has an App.config
Also a video on youtube http://www.youtube.com/watch?v=mX8quq7MoeI

Web Deployment Issue Using Windows Azure Accelerator For WebRoles

I am new to Azure Accelerator for web roles I have performed each step on the guidance from the net but I am getting an error when I try to deploy my website.Everything is rechecked by me WMSvc is running and is set to auto and username and password is correct but I dont understand where is the problem.
Error 1 Web deployment task failed.(Remote agent (URL http://2f96c9ab6cda4281bcf25a899d66955d.cloudapp.net/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.) Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator. Error details: Remote agent (URL http://2f96c9ab6cda4281bcf25a899d66955d.cloudapp.net/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer. An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. The remote server returned an error: (401) Unauthorized. 0 0 QuickMVCdep
Please help me to find the solution so that I can deliver my project to Client.
I have run into the same issue.
It appears that the Publish action from the VS Azure tools will set up the MSDeploy correctly as part of the deployment process, but creating a package from VS and then upgrading the server using the Azure portal will not. Which is a bummer since the VS Publish action deletes the deployment and then recreates it, which will reassign your VIP address.
I haven't been able to pinpoint the difference, but one thing I've noticed is that if you do a Publish from VS, MS Web Deploy 2.0 will be installed for you, whereas I don't believe it is when you run an Upgrade. That said, I've never managed to manually install/configure the right bits on an Azure server to enable MSDeploy (I suspect that there is some LB/firewall configuration that happens outside of the host to allow traffic to 8172).
All in all, MSDeploy is useful enough during development that I prefer that pain (which requires me to change my A record in my DNS every time I do a major upgrade) over the alternative (Upgrade using the portal and lose the ability to use MSDeploy).
I would love to learn of a solution where we can have our cake and eat it too (an upgrade package that allows MSDeploy'ing a web role).

Resources