Azure Caching issue(some setting on Azure account

2019-09-06 04:16发布

I have a problem about web.config file which is exist on MVC3 Cloud project.

As you know for using Sessions on Cloud you need to create name space on Azure account Caching side. And get some custom settings for web.config data from azure and copy them in your project.

Till here everything works fine. But if add some additional line in my web.config file like this.

 <appSettings>
    <add key="key1" value="value1" />
    <add key="key2" value="value2" />
 </appSettings>

than my project getting crash. Sessions has decided not carrying any data anymore. İf I remove that lines everything works fine again.

Do you have any idea what cloud be wrong?

By the way I am using these key and value pairs for set and read cookie settings.

Thanks in advance....

1条回答
做个烂人
2楼-- · 2019-09-06 05:12

The easiest way to get setup with Azure Session is to use the ASP.NET Universal Providers using NuGet simply type:

PM> Install-Package System.Web.Providers

Once it's include in youre project you can use SQLAzure, AzureStorage table or the Azure Appfabric caching.

You can read more about the provider here: The Magic Provider (also call Universal Providers)

查看更多
登录 后发表回答