4
votes

I am totally new to Azure and have been asked to move websites to Azure hosting.

Moving to Azure hosting do seems to an issue but problem seems to be with the asp.net session state, our website which are developed using asp.net 4.0 & MVC & some of the website are quite old developed few years back around 2013-2014.

My big worry is how to choose session state or third part session cache where we wont need to make any change in code other than to web.config file.

We so many article around it has created confusion.

I would appreciate best way we can migrate to azure hosting without making changes to code other than web.config file.

I looked at Azure Redis Cache but this also required to install Microsoft ASP.NET Universal Providers and changes to config file link.

Does Azure provide MS SQL Database with build in support for SQL Session, so that we only need to make change to web.config file rather than installing packages using nuget etc..

This option of Microsoft blog seems to be the option can some config if this right & easy approach. but also at the comment user have posted few issue with this approach https://blogs.msdn.microsoft.com/sqlserverstorageengine/2017/11/28/asp-net-session-state-with-sql-server-in-memory-oltp/

Based on above let me give more details

  • We use windows based dedicated server for hosting
  • We use MS SQL SERVER Windows 2012 for database
  • IIS 7.5
  • and other software to managing website such as plesk
  • We have website developed in asp.net webform based website running with framework 4.0 or 4.5
  • We also have few asp.net MVC based website running on framework 4.5
  • We use InProc default session state

Firstly, my big concerns are session state, i want to migrate to Azure without making any changes to code except changes to web.config is this possible?

Second we use MS SQL SERVER 2012 as database what is equivalent of same in Azure as in some page it refers database as SQL Database and some where as Azure SQL Database which creates confusion of this SQL Database or Azure database as i have red that these are two different things?

Third, let us say i choose Meb+Mobile--> App Service Standard Package (which comes with upto 10 instance) what are these instance? and will individual session always connect to same instance?

Forth: Database i have about 20 database one of them is about 6GB & other database are about 200MB-700MB which service should i use for database

  • Single Database or Elastic?
  • Can i create multiple database under elastic mode?
  • Let us say if i choose "100 eDTUs: 10 GB included storage per pool, 200 DBs per pool, $0.20/hour" will i have total of 10GB space for all database in elastic pool and what is per pool and how many pools will i get in this option.

Fith:Disk Space, let us say i choose App Service "S2: 2 Cores(s), 3.5 GB RAM, 50 GB Storage, $0.200", is 50GB diskspace include OS or space allowcated to file which we upload?

I have asked too many question as i didnt had clarity from MS chat as they just passed links which can be confusing at time

1

1 Answers

2
votes

Yeah, the Redis session state provider is a Nuget package, though you could possibly install it in another project and just throw the DLL in the app's bin folder. I have not tested this, so I can't know if it would actually work.

But another option for legacy apps is to keep ARR Affinity on in the App Service (if you are using them). This effectively sets a cookie on the client when they first connect so the load balancer will always connect them to the same instance, so in-memory session state works.

The problem with that is of course if the instance restarts for any reason, you lose the session state. Auto-scaling is also a bit of a problem.