locked
Unable to do Session State management with Windows Azure Storage RRS feed

  • Question

  • Hi,

    For session state management , I am using Windows Azure Storage with

    following configuration: SeviceConfiguration.csfg

    <

     

    ConfigurationSettings>
    <

     


    Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    <

     


    Setting name="AccountName" value="devstoreaccount1" />
    <

     


    Setting name="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
    <

     


    Setting name="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1" />
    <

     


    Setting name="QueueStorageEndpoint" value="http://127.0.0.1:10001/devstoreaccount1" />
    <

     


    Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1" />
    </

     


    ConfigurationSettings>

    Web.Config settings

    <

     

    appSettings>
    <

     


    add key="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1" />
    <

     


    add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1" />
    <

     


    add key="AccountName" value="devstoreaccount1" />
    <

     


    add key="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
    </

     


    appSettings>

    <

     

    sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">
    <

     


    providers>
    <

     


    clear />
    <

     


    add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" />
    </

     


    providers>
    </sessionState>

    Currently , I am using windows azure SDK 1.3 and ASPProvider.dll as reference.

    When running , getting following error:


    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    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.

    Source Error:

    Line 25:       <providers>
    Line 26:         <clear />
    Line 27:         <add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" />
    Line 28:       </providers>
    Line 29:     </sessionState>
     


     
    >


    Seema Patre
    Thursday, February 3, 2011 11:59 AM

Answers

  • Hi

    I got the solution:

    1. Download ASPProvider  sample code.

    2. Delete existing reference Microsoft.WindowsAzure.StorageClient (SDK 1.2) from ASPProvider app. 

    3.Add Microsoft.WindowsAzure.StorageClient from windows azure SDK 1.3 version.

    4. Rebuild it (ASPProvider.dll) .

    5. Add that newly generated ASPProvider.dll in your current application. Build it.

     


    Seema Patre
    • Proposed as answer by Apollo Gonzalez Thursday, February 10, 2011 12:36 AM
    • Marked as answer by Mog Liang Thursday, February 10, 2011 1:59 AM
    Wednesday, February 9, 2011 9:05 AM

All replies

  • Hi,

    For session state management , I am using Windows Azure Storage with

    following configuration: SeviceConfiguration.csfg

    <

     

     

    ConfigurationSettings>

    <

     

     

    Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />

    <

     

     

    Setting name="AccountName" value="devstoreaccount1" />

    <

     

     

    Setting name="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />

    <

     

     

    Setting name="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1" />

    <

     

     

    Setting name="QueueStorageEndpoint" value="http://127.0.0.1:10001/devstoreaccount1" />

    <

     

     

    Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1" />

    </

     

     

    ConfigurationSettings>

    Web.Config settings

    <

     

     

    appSettings>

    <

     

     

    add key="TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1" />

    <

     

     

    add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1" />

    <

     

     

    add key="AccountName" value="devstoreaccount1" />

    <

     

     

    add key="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />

    </

     

     

    appSettings>

    <

     

     

    sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">

    <

     

     

    providers>

    <

     

     

    clear />

    <

     

     

    add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" />

    </

     

     

    providers>

    </

     

     

    <span style="font-family: Consolas; color: #a31


    Seema Patre
    • Merged by Mog Liang Friday, February 4, 2011 2:08 AM
    Thursday, February 3, 2011 11:56 AM
  • If your service is in the US South Central datacenter you might want to look at the Session State Provider that is part of the Azure AppFabrics Labs release.
    Thursday, February 3, 2011 7:06 PM
    Answerer
  • Hi Seema,

    The ASPProvider from trainingkit would read the storage account from cloud project setting "DataConnectionString", I didn't see this setting in your cscfg file.

    Please refer to this thread

    http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/76f7b33b-24a1-4f8e-8099-0c99ea5db16c

    Thanks,


    Mog Liang
    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
    Friday, February 4, 2011 2:21 AM
  • Hi

    I got the solution:

    1. Download ASPProvider  sample code.

    2. Delete existing reference Microsoft.WindowsAzure.StorageClient (SDK 1.2) from ASPProvider app. 

    3.Add Microsoft.WindowsAzure.StorageClient from windows azure SDK 1.3 version.

    4. Rebuild it (ASPProvider.dll) .

    5. Add that newly generated ASPProvider.dll in your current application. Build it.

     


    Seema Patre
    • Proposed as answer by Apollo Gonzalez Thursday, February 10, 2011 12:36 AM
    • Marked as answer by Mog Liang Thursday, February 10, 2011 1:59 AM
    Wednesday, February 9, 2011 9:05 AM