0

Azure トレーニング キットの TableStorageSessionStateProvider を使用しようとしています。この例は問題なく使用できますが、Web アプリで使用すると、次の例外が発生します。

System.Data.Services.Client.DataServiceRequestException occurred
  Message=An error occurred while processing this request.
  Source=Microsoft.WindowsAzure.StorageClient
  StackTrace:
       at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
       at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
       at Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.<>c__DisplayClass5.<ResetItemTimeout>b__4()
  InnerException: System.Data.Services.Client.DataServiceClientException
       Message=<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code>UpdateConditionNotSatisfied</code>
  <message xml:lang="en-US">The update condition specified in the request was not satisfied.
RequestId:c552d552-ba1c-4920-84fc-e716705b58b9
Time:2011-02-17T12:43:38.5650557Z</message>
</error>
       Source=System.Data.Services.Client
       StatusCode=412
       StackTrace:
            at System.Data.Services.Client.DataServiceContext.SaveResult.<HandleBatchResponse>d__1e.MoveNext()
       InnerException: 

これを試してみましが、これまでのところ運がありません.null参照例外が発生しているのも見たので、TableStorageSessionStateProviderがInProcのように動作していないと思うので、アプリケーションでセッションがどのように使用されているかを確認する必要があるかもしれません. しかし、何が問題なのでしょうか?

編集:まあ、同じ例外で TableStorageSessionStateProvider のみを使用すると、Azure トレーニング キットの例も失敗することがわかりました。他のプロバイダーにコメントするだけです:

<authentication mode="Forms">
  <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>

<!-- Membership Provider Configuration -->
<!--<membership defaultProvider="TableStorageMembershipProvider" userIsOnlineTimeWindow="20">
  <providers>
    <clear />
    <add name="TableStorageMembershipProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageMembershipProvider" description="Membership provider using table storage" applicationName="AzureStore" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="true" passwordFormat="Hashed" />
  </providers>
</membership>

<profile>
  <providers>
    <clear />
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
  </providers>
</profile>

--><!-- RoleManager Provider Configuration --><!--
<roleManager enabled="true" defaultProvider="TableStorageRoleProvider" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
  <providers>
    <clear />
    <add name="TableStorageRoleProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageRoleProvider" description="Role provider using table storage" applicationName="AzureStore" />
  </providers>
</roleManager>-->

<!-- SessionState Provider Configuration -->
<sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">
  <providers>
    <clear />
    <add name="TableStorageSessionStateProvider" type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="AzureStore" />
  </providers>
</sessionState>
    <machineKey decryption="AES" decryptionKey="F7FA540B4DFD82E5BB196B95D15FF81F5B973B5514F973D2A46B4C52224A3ABC" validation="SHA1" validationKey="5B973B5514F973D2A46B4C52224A3ABC90378EFA9DE62168764FF0DCE537184F0535D5D9AD66DEDC5B973B5514F973D2A46B4C52224A3ABC90378EFA97DC1ABF" />

4

1 に答える 1

1

このエラーが発生する理由を知りたい場合は、この質問TableStorageSessionProviderに対する私の回答を参照してください。Azure での SQL セッション プロバイダーの使用について知りたい場合は、この質問への回答を参照してください。

現在何かを使用する必要がある場合は、サポートされていなくても、SQL セッション プロバイダーを使用するしかありません。AppFabric キャッシングが CTP から外れたら、それが進むべき道です。

于 2011-02-17T20:30:02.863 に答える