ASP.NET (MVC) application with Session State on an Azure SQL Server Database (same as app's)

StackOverflow https://stackoverflow.com/questions/21500938

سؤال

I read (and tried) everything I found about this goal, but I still cannot handle it...

I found I have to run this script:

aspnet_regsqlazure.exe -ssadd -d -sstype c -S -U -P

after having downloaded the executable, but it says that:

Install Session State is not supported by aspnet_regsqlazure

...and this is only the last step I tried: when I could create (any?) tables in the database, then it always says that:

Unable to use SQL Server because either ASP.NET version 2.0 Session State is not installed on the SQL server, or ASP.NET does not have...

Is there anyone that can point me to the right (and updated!) infos on this subject?

Thanks in advance.

AB

هل كانت مفيدة؟

المحلول

Use the Redis cache, it's significantly faster, easier to set up and cheaper. See the Azure Redis Cache (Preview) ASP.NET Session State Provider section of MVC movie app with Azure Redis Cache in 15 minutes

نصائح أخرى

If you use the ASP.NET Universal Providers you don't need to create the session tables upfront; it will be done automatically using EF Migrations when your app starts up.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top