Why Microsoft.WindowsAzure.StorageClient could not be loaded.
-
2012年6月26日 下午 09:20
Hi,
I have a asp.net mvc 2 application on window azure sdk 1.3 working fine. The part of web.config is,
<sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">
<providers>
<clear/>
<add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="OTP.Ring.Web"/>
<!--<add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="OTP.Ring.Web"/>-->
</providers>
</sessionState>
But after upgrade to azure sdk 1.5, when loading the page, it gives error,
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Exception has been thrown by the target of an invocation.Line 58: <providers> Line 59: <clear/> Line 60: <add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="OTP.Ring.Web"/> Line 61: <!--<add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="OTP.Ring.Web"/>--> Line 62: </providers>
Source File: C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\trunk\Ring\Web\web.config Line: 60
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information === LOG: User = zhang-PC\zhang LOG: DisplayName = Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///C:/Users/zhang/Documents/Visual Studio 2010/Projects/OTP/Ring/Application/trunk/Ring/Web/ LOG: Initial PrivatePath = C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\trunk\Ring\Web\bin Calling assembly : AspProviders, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\trunk\Ring\Web\web.config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/49b72765/b4d5c602/Microsoft.WindowsAzure.StorageClient.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/49b72765/b4d5c602/Microsoft.WindowsAzure.StorageClient/Microsoft.WindowsAzure.StorageClient.DLL. LOG: Attempting download of new URL file:///C:/Users/zhang/Documents/Visual Studio 2010/Projects/OTP/Ring/Application/trunk/Ring/Web/bin/Microsoft.WindowsAzure.StorageClient.DLL. WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
I wonder what is the problem.
Thanks
York
所有回覆
-
2012年6月27日 上午 06:42版主
Hi,
Please upgrade to SDK 1.7 and use the new cache feature to store session data. If you have to use the sample table storage session provider, you have to reference an old version of storage client library.
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
- 已編輯 Arwind - MSFTModerator 2012年6月27日 上午 07:14
-
2012年6月27日 上午 07:02
Thanks. I'd like to know how to use the new cache feature.
York
-
2012年6月27日 上午 07:13版主
Hi,
The new cache is role-based cache, and old version is public caching service, they are different thing, you can refer this article and sample for more info:
http://msdn.microsoft.com/en-us/library/windowsazure/hh914161
http://code.msdn.microsoft.com/windowsazure/Windows-Azure-Caching-78a49b70
Public Caching service tutorial:
http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_BuildingAppsWithCacheService
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
- 已編輯 Arwind - MSFTModerator 2012年6月27日 上午 07:15

