Azure Caching issue(some setting on Azure account and web.config file for Sessions)

浪子不回头ぞ 提交于 2019-12-25 02:43:03

问题


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:


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)



来源:https://stackoverflow.com/questions/9067289/azure-caching-issuesome-setting-on-azure-account-and-web-config-file-for-sessio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!