Can i deploy Azure project on IIS? - asp.net

I have solution with startup project that have .ccproj format. This is an Azure project that require Azure SDK installed. By default i am able to run it using IIS Express with Azure storage emulator & Azure compute emulator. But when i make some changes i need to recompile entire solution and re-run it. How can i deploy it in IIS server ? Could you advise me alternative deploy method how to run it in simplest way ?
I want to re-compile and attach to process after make some changes in project without restarting IIS Express & Azure emulators, it takes a lot of time.

#DotNetGoose,
should be able to run on IIS but you will need to abstract all the calls that your code read content from RoleEnvironmental and direct them to read from Web.config, and have a copy of corresponding settings in your web.config.
once the abstraction is done, set your web app as default startup project, you should be able to run them as normal web app on iis or iisexpress.

Related

Deploying Application Insights bits to another server

I installed the Application Insight SDK from nugget packages and when I run the code I am able to log the telemetry data to cloud. Now I want to move these bits to my TEST server.Can I copy the bits directly to TEST server. after doing this, does the application logs the data to Azure?
I am using ASP.Net Application.I created Application Insight Resource in the cloud with the application type as ASP.NET.
The Application Insights SDK libraries should be deployable using XCOPY (i.e. just copy everything along with your application) without problems. Make sure to include your ApplicationInsights.config file and any changes to the Web.Config file as well.
However, remember that if you want to capture dependency calls in an IIS application, you will need to also install Status Monitor on the Test server as well.

Windows Azure cloud service asp.net config file changes

I have deployed my asp.net web site using cloud service. I have deployed it by publishing from Visual studio.
problem is every time if i have to make changes to web.config, i have to redeploy from visual studio.
Is there anyway we can directly modify from windows azure? I don't want every time developer should involve in this.
Instead of defining your settings in web.config file, you should define them in Service Configuration File (*.cscfg). Then you should be able to change the values from Azure Portal and other means without redeploying your code.
At any cost, stay away from making web.config changes in the deployed code (using RDP or some other means). If for some reason Azure decides to deploy your code in other VM, your changes will be lost. See this thread for more details: Azure Webrole loads old website version after restart.

How to only deploy changed project files in Windows Azure?

I am working on a web project in ASP.NET which is integrated with Salesforce. I have published my web project in Windows Azure. Now I have some changes in particular files and I want to deploy these changes only rather than complete project.
If you are using Web Deploy from within Visual studio, it will automatically only deploy the changed files in a differential manner. Alternatively, if you are using Azure VM's or a Cloud Service (which is actually VM's), you can connect to the machine(s) using RDP and update select files manually. You can get the RDP information to the machine from the Azure Portal.
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-log-on-windows-server/

Deploy to an Azure WebRole without Visual Studio

Is there a way I can deploy my entire website/webapp to an Azure WebRole without the need of Visual Studio?
Context: We have a test environment where there's an IIS hosted web app where our testers test (of course). The thing is, we want to grab that exact tested web app folder and deploy it "as is" to a WebRole.
Please avoid commenting on our procedure, we have been looking at it and we will eventually change it if we have to, I just need a 'simple' yes(how)/no answer.
IIS Web Deploy can be used to package/migrate/restore IIS applications. It can be enabled while deploying a web role as described in this article and allows to update the web role with the application as deployed in your test environment.
Be aware that only single instance cloud services are supported and that in case of a maintenance operation by the fabric controller, your service will be rolled back to the state created by the initial azure package deployment. (There once was a tool for syncing between multi-instance web deployments but sadly that did not work out too well and is no longer supported. Do not attempt to use or rebuild it.)
Installing and Configuring Web Deploy shows the steps to get web deploy for your local testing IIS while articles on using web deploy like this one show examples for calling the tool.
Another option to evaluate are azure websites and git deployment. This could provide you with a documented and reproducible form of deployment that is not prone to unwanted rollbacks while allowing the service to scale to multiple instances. This option might not work out if the application it too tied to the web roles infrastructure or contains code not suitable for the more restricted web sites environment.
A third option to look at is using CSPack as presented in this article. You basically create a service definition and package up the webapp manually without building it in Visual Studio or TFS.
Yes - make sure you have enabled Remote Access on your webrole. Then copy your web app from your local IIS folder to F:\sitesroot\0 (NOTE - may be E:\sitesroot\0 on same web roles).
Yes, you can write a programmatic interface against Web Deploy from your C# code. If you're deploying to Azure Web Sites, you could also use the Windows Azure Management Libraries to spin up new web sites or clouand deploy them.

Windows Azure: Can I just use it like a standard Windows 2008 Server?

I've created an Azure server instance. I've deployed a simple application to it. As part of the deployment process I enabled Remote Desktop Connections.
I have some standard ASP.net applications that run on Windows, is there something to stop me deploying these applications manually to IIS using Remote Desktop. I've read so much about having to migrate standard ASP.net apps to Azure. I don't want to this as we will have customers who will still use Windows Server 2003/2008 so I don't want to have to maintain 2 versions.
Well, as I understand it, in theory you could deploy stuff using remote desktop. But when the instance shuts down/restarts you'll lose it all (unless you've built it into your startup scripts) and have to re-load everything each time. The main reason they suggest you have at least two instances is so that when one shuts down for updates etc there is always at least one other running.
The "Windows Azure Accelerator for Web Roles" project allows you to create an Azure web role which then enables you to use web deploy for all your other web sites - I'm guessing that will be a whole lot better approach and is definitely worth a look. Also, I believe smarx.com is a good place to browse for info and ideas.
Using a startup task and the Azure Bootstrapper you can download, unzip, install almost any kind of 3rd party software that supports either xcopy deployment (just copy the files) or an unattended(silent) install.
Assuming you aren't using Azure storage or anything like that, there shouldn't be any difference with the IIS application. If you are using anything specific to Azure, you can use the RoleEnvironment.IsAvailable to test if you are running inside Azure or not. That will return true for the emulator as well. If you want to use Azure storage from both, you can add the settings in the web.config to use if not running in Azure.

Resources