Access Denied Error using Azure Cache
I have an application that uses App Fabric Cache. The application works fine Onpremise, but when I publish it to Azure, I get an Access Denie开发者_运维技巧d error when cache is being accessed.
I have configured my Azure deployment's web.config to contain the Cache client settings that exist in the Azure mamangement application. My cache in Azure is also setup and has an "Active" status.
What could I be doing wrong? Am I missing a configuration step?
What might be happening is that the item that is stored in the cache is not available once it's deployed. For example if MyProject.Cache.Foo
which is in the assembly MyProject.Cache
is available on your local deployment, but this isn't available when deployed to the cloud you can get this error.
You can end up in this situation either when you haven't included the assembly it you cloud deployment (check the Copy Local properties of all of the references that you're using) or if you've renamed/moved the class. e.g. if you put a MyProject.Cache.Bar
into the cache with a key of "B", then you rename the class to MyProject.Cache.Foo
, because by default items stay in the cache indefinitely, when you try to get out the item with a key of "B" you get a "Can't find file" error.
精彩评论