I have migrated a website to cloud, which works perfectly on my local machine using the Compute and Storage Emulators.
However, when I put it onto Windows Azure Cloud, the session and cookies are not working fine. Part of web.config file is given below.
<sessionState timeout="30"
mode="SQLServer"
sqlConnectionString="Server=sxxxxxxxxx.database.windows.net;User ID=xxxxx@sxxxxxxxxx;Password=MY_PASSWORD"
cookieless="false"
allowCustomSqlDatabase="true" >
</sessionState>
Can anyone please guide be in correcting the same ? All the other things in the website are pretty much working fine.
Below is some additional information:
To summarize, I have done the following.
-
Migrated a website to Windows Azure successfully
-
Created the required connection strings for the database access successfully.
-
Tested the website on the local machine using Compute Emulator and Storage Emulator.
-
When I published the website and uploaded the packageFile and configurationFile, everything was working fine in general. BUT
for the pages which used session/cookies. All static pages worked well. All database access were proper.
- Then, I wrote some code for setting right the session.
GOT ERRORS AND ENTIRE WEBSITE STOPPED WORKING
- Created the database and tables that were required (ASPSTATE database and its corresponding tables). Everything went well.
http://blogs.msdn.com/b/sqlazure/archive/2010/08/04/10046103.aspx
Tested the website … Still getting the error on local and on cloud…as mentioned previously in this post.
Can you please guide me to rectify this.
.Hey guys,
Thanks for the replies. I modified the session state in web.config a little and its as below
Now its working fine.
Regards
Sandeep