Setting Up And Using Web Deploy with Azure WebRole in Visual Studio (One-Click partial update) - azure

I am using Windows Azure, and find it a lot difficult and useless make a new "Package" each time you make a small change, and want to test it on the Cloud. I heard about the opportunity to update the web roles without re-deploy the whole instance each time (about 15 minutes), and do a Web Deploy - upload just the modified files (some seconds).
None of the resources found on the web seems to describe this particular situation.
There are tutorials, on how to enable Web Deploy on Azure Web Roles, but not a one how to set it up. [This tutorial is showing the settings, but not for Azure]

To enable web deploy you first need to be able to do a standard Publish (not Package) from the CloudConfiguration project.
there are some good tutorials how to do that.
While the Publish dialog is open, make sure to select this option, and make a normal publish.
After this configuration is published, you are ready to set up the Publish settings for the Web Role project. Note, the CloudCongiguration project is used for Package deployment, and the Web project is used to deploy to Azure via Web Deploy as deploying to normal web hosting.
When you click on the "Publish" context menu of the Web project, a "Publish Web" dialog appears. All settings are easy to guess/standard, except the second tab: Connection.
Here the things go little hard, if you have not messed with Web Deployment before.
Must select the Web Deploy method
The URL to your Web Role (DNS or IP address found on Windows Azure Management portal)
The name of the web site in the IIS on the Host machine. In our case this is the Azure WebRole instance. So Login via RDP, start "Server Management", navigate to: Roles->WebServer(IIS)-> Internet Information Services Manager. In the Connections Pane (The Left part of the Manager) expand the tree-view pointing to the "localhost" service -> Sites -> and there you find the Website Name (should be something like : xxxxx_IN_0_Web)
This is the username you use for RDP connections /and the password below/
is that strange URL, that is pointing to the Web deploy Service, that will eventually update our website content.
you can check, if the Package deployment went OK, in the Azure Management portal, on the Overview page of the web deployment if the port 8172 is open.
Now "Validate Connection" should succeed!
If not, try "http://{0}.cloudapp.net//MSDEPLOYAGENTSERVICE" for Destination URL

Related

Connecting to an Azure App Service via IIS Manager (inetmgr)

Is it possible to remote-connect to an Azure App Service running on Windows with my IIS Manager?
This seems to have been possible according to this blog post by clicking in IIS Manager File -> Connect to a site.
I refer to the steps mentioned in the link shared by you and in the last step I got an error below.
I did some research on it and it looks like managing the App Service from IIS is not supported anymore. I have not got any official link but the below links might give you some information on it.
Microsoft.Web.Configuration.AppHostFileProvider not found after configured Remote IIS Administration for Microsoft Azure Web App
Can no longer manage any Web Apps with IIS Remote Manager - Could not load file or assembly - AppHostFileProvider
I'm not sure for what purpose why you want to. My thoughts is you shouldn't be doing that as it defeat the purpose of PaaS services. Cannot access the iis layer in app service however you can still configure in web.config of your web app.

Azure Resources WebApp deployed but not accessible from url

I'm trying to access my app, hosted on azure.
I've a finished c# solution. When I commit changes to Azure DevOps it triggers a (working & successful) build-pipeline.
It runs tests, publishes an artifact & testresults.
In my ServicePlan status is Ready and I see Data Exchanges on DataIn & DataOut graphs.
The Deployment Center:
Bu when I click the https://mywebsite.azurewebsites.net, No webpage was found for the web address.
I have Some basic Azure DevOps expierence, but this Azure Portal is something else :)
My basic questions would be:
Why is it not working?
Do I need a second pipeline, only for release? Or can I recycle the build pipeline?
Do I need some kind of deployment slots? Before I select a not-free slot, I want to know if this is necessary
What else could I be missing?
(My Azure resources include a sql-server, a sql-db, the actual appservice & a app service plan)
Thanks!
If you deploy web app to Azure and login https://<app-name>.azurewebsites.net, then the page still shows Microsoft page instead you owner page. You need check the default document, please ensure that the default page is listed in here.
Steps: login azure portal->App Service->configuration->Default documents
In Azure Web Apps, the default document is the web page that is displayed at the root URL for a website. The first matching file in the list is used. Refer File structure on azure to know more about the files and directories on Azure Web App.
Update1
When I go to the azurewebsites.net url I get a 404: No webpage was found for the web address.
Check this doc:
If you receive an HTTP 404 (Not Found) error when you browse to the URL of your custom domain, verify that your domain resolves to your app's IP address by using WhatsmyDNS.net. If not, it might be because of one of the following reasons:
The custom domain configured is missing an A record or a CNAME
record.
The browser client has cached the old IP address of your domain.
Clear the cache, and test DNS resolution again. On a Windows machine,
you clear the cache with ipconfig /flushdns.
Update2
the URL in my appservice is Azure-generated right?
Yes, then app service url is generated by Azure.
With making a new app service and going to the URL I do get a message app service is up and running.Time to take the next step and deploy your code.
And now, we should get this page, we need create new service connection and re-configure build and release pipeline and deploy your app.
Note: We need use the same user account and AAD domain to do this.

Web Deploy unable to validate connection

I am trying to learn how to setup Web Deploy functionality on both sides Server and host/client computer. Created a Windows Server 2012 Web Server in Hyper-V and able to access default web page in host/client computer. On server installed Web Maintenance Service, Web Deploy 3.5 and performed all the required steps e.g. "Configure Web Deploy Publishing" and added Administrator to IIS Manager Permission for the website in IIS. I disabled Firewall totally to make it work for the first time.
On client computer I created a dummy MVC Application in Visual Studio and trying to create publish profile for this app. As soon as I hit the Validate Connection I got the option to receive and save the security certificate from server but after that in gives me following warning (snapshot):
Tried doing all the steps all over but no luck.
I am open to all feedback. Thanks in advance.
Found the solution. Instead of adding publish information manually, I am suppose to use publishsetting file generated in server through "Configure Web Deploy Publishing" feature of IIS. Server address ends with file name which ends with .axd

How do I use web deploy to deploy sub site in Windows Azure

I have a web role with multiple sites accessible using different port numbers.
e.g. (main site) http://site.cloudapp.net , (sub sites ) http://site.cloudapp.net:8080, http://site.cloudapp.net:8081
I can use web deploy to deploy the main site . How can I use web deploy to deploy the sub sites?
You can deploy to a sub-application by prefixing it with the parent site name. For example mysite/myapplication. ScottGu's blog has more details if you need them.
However, I'd be more concerned since you said you are doing this with an Azure web role which are deployed on virtual machines with ephemeral disks (non-persistent if the hardware fails or needs to be redeployed). If Azure re-deploys your web role to another VM your "web deployed" changes will be lost and the contents of your cspkg will be redeployed. If you really want to use web deploy your should consider using Azure Web Sites or Azure Virtual Machines, otherwise to ensure your changes are not lost you'll need to republish the full cspkg file and allow Azure to deploy the changes to all your instances.

How to publish asp.net web site to azure when not an asp.net web project

Using Visual Studio 2012 RC, I have many existing asp.net (VB) web sites and I always simply select open web site when I edit them in VS, they are not web projects.
I want to publish some of them now to my azure account, but if I simply right click the solution and select publish web site I dont get the same publish options as I do if it was a web project? I get the default publish option asking me where I want to place my compiled pages.
How can I import the publish settings for my azure web site for web sites?
I don't want to have to convert all web sites to projects.
Windows Azure Web Sites allow you to deploy your website in different ways, including TFS, Git, ... But in your case it might be interesting to look at FTP deployment. This because, when right clicking on a web site you can choose to copy the website:
The copy feature allows you to copy the website to an FTP server.
The information to access your web site through FTP can be found on the dashboard.

Resources