Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure web sites: what are the gotchas?

Tags:

asp.net

azure

I'm designing a web site that will initially be hosted in a standard ASP.Net environment but want to be able to easily move it to Azure later. What are the gotchas between the two environments, and what do I need to be careful of doing. I'm trying to figure out as I design the site what I need to be careful of doing.

General site requirements / context:

  • Simple application site
  • support individual user login
  • support for data store, doesn't necessarily have to be relational
  • support for upload/download of individual files (1k - 25k on avg, text based)

Any help or things to watch out for in straddling these two worlds would be appreciated.

like image 691
Peter Oehlert Avatar asked Jan 21 '26 11:01

Peter Oehlert


2 Answers

Gotchas can mean a whole lot of things..... :)

In general, the code should easily migrate from ASP.NET to Azure

Things to be aware of:

  • Session state is bad since you are never sure what Azure VM you will hit
  • You don't want to persist ANYTHING to the file system. MS will gurantee VMs will be up, but they can recycle any files you have on the server and they will be lost. Persistence should happen in Blob and/or Table storage.
  • If you are doing lots of downloads of individual files, consider starting out with a separate URL. You can then easily use the Azure CDN for distributing globally and providing users better performance
  • In regards to Azure table storage. This will provide an order of magnitude less cost than SQL storage and works great for certain scenarios. However, there is not a native ASP.NET version of this. If you think you want to use Azure table storage, start with it. The canonical example from MS are blog posts. We have used successfully in the past, but there are some gotchas like data being case sensitive if you need for your application
  • Logins can use the Membership provider constructs in the ASP.NET stack. Obviously, out of the box is SQL, but you could roll your own to use table storage

There are plenty of other things, but in general, ASP.NET applications can migrate pretty easily. If you want to look at utilizing some Azure specific features, like table storage or worker roles, those do not exist natively in the ASP.NET stack and it would be best to just start the site in Azure.

Ping if you have specific questions

like image 79
John Ptacek Avatar answered Jan 23 '26 02:01

John Ptacek


I've been building up a list of deeper technical content on Windows Azure Web Sites Cheat Sheet which you could view for more content. Currently it's heavily weighted with PHP information, but I hope to extend with Python, Node.js, .NET, Java and other Web Sites technical content soon.

The cool thing about this site, is that it is available on github Microsoft Azure Web Sites Cheat Sheet so if you run into something, you can document it to help out the greater Azure Web Sites Community.

like image 25
cory-fowler Avatar answered Jan 23 '26 03:01

cory-fowler