0

I have reviewed all the questions relating to deploying .NET applications into Azure but there is something I still need to understand. I have seen and tested myself that will Visual Studio 2010 its very easy to Publish and deploy an existing .NET app into Azure - all the features and tools are there.

However am I still able to maintain and update my original .NET application and then when necessary release updates to the Azure package? I would want to do this on an ongoing basis as a means of having 2 solutions for our clients - a public cloud solution or a local on-premises .NET solution.

The additional issues are that we would be running the .NET app off a SQL server and also the application would be interacting with external web services. How easily are those deployed into Azure on an ongoing basis and NOT as a ONCE OFF.

EDIT: If the above is not possible i just noticed that one can create a full Windows 2008 server image and create a VM role in Azure. Does anyone have any comments on this as I dont know enough about it. Would this be a possible solution to my problem?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Gotts
  • 2,274
  • 3
  • 23
  • 32

3 Answers3

0

You can deploy to Azure all you want. The best way to handle it is to deploy to Staging and then once it is up and running, in the portal do a VIP swap. Then you have the new package running in Production and you can stop/delete the old one running in Staging.

For SQL Server in Azure, you should look into either using SQL Azure or using Azure Connect to communicate with a SQL Server running on-prem. Or you could use the Service Bus as well.

Tom
  • 1,611
  • 10
  • 11
  • But can i maintain my .net application at the same time and then push updates to Azure. And the issue is that I would want to do the same with the database - ie my .net app should talk to SQL server while my azure app should communicate with sql azure. – Gotts Mar 22 '12 at 16:05
0

If your application was not very complexity you can use the same code for windows azure+sql azure and local server+sql server. Let's say it's a web application if you don't mind to add the windows azure assemblies that's totally ok to run it under a local server.

Regarding the sql azure/sql server, I think you just need to change the connection string in your configuration to let your code link to the proper server.

Maybe you need some additional task to make to fulfill for both azure and local. You might need to provide a file system interface which can read/write the file from the blob or from local disk based on configuration. So that in your business code you will do not mind where and how to handle the file problem. Maybe you also need a configuration interface to read the settings from web.config or your cscfg file. But if you have put all configuration in database that would be better.

Basically I don't think it's impossible to use one code base for both azure and local. I had done a project in this way by introducing some interfaces to isolated the azure related operations. Just make sure you can configured/injected for everything different between the azure and local.

HTH

Shaun Xu
  • 4,476
  • 2
  • 27
  • 41
  • Thank you - very helpful - 1 step closer. In .NET once I have created my Azure deployment it seems like I can only run the solution in the Azure emulator, it wont let me run it on IIS. Is this something I can easily change? Do you know? – Gotts Mar 23 '12 at 13:10
  • If it's a web role, you can set the start up application to your web project (not the azure project), then it will be run under your IIS or the dev host, exactly as if you have a normal ASP.NET we application. But if your project is using something under azure, for example the storage, local resource or azure config then it will be failed. This is why I mentioned you'd better use some interfaces to isolate. But it's a worker role it has to be run under the azure development emulator. – Shaun Xu Mar 25 '12 at 05:24
0

I feel like this is your real question:

However am I still able to maintain and update my original .NET application and then when necessary release updates to the Azure package? I would want to do this on an ongoing basis as a means of having 2 solutions for our clients - a public cloud solution or a local on-premises .NET solution.

And this is not specific to windows azure. What you want is a source control. You can use something like TFS to create different copies of the same code. Then you can have copies of both projects with version history. There are so MANY more benefits to using source control and I would strongly recommend you would look into using source control on every project you work on.

BentOnCoding
  • 27,307
  • 14
  • 64
  • 92
  • i agree that source control is important and i will be using it on the project. But my whole point was that I want to maintain one project only with deployment packages for both .NET and Azure without having to mess with the source code. I am hoping that a .NET expert can let me know if this is still possible and also how this impacts connectivity to the 2 different databases (Azure and SQL server). Thanks – Gotts Mar 23 '12 at 13:07