DotNetOpenAuth。报告启用报告错误

时间:2015-07-27 09:11:46

标签: c# asp.net-mvc oauth dotnetopenauth isolatedstorage

我刚刚将DotNetOpenAuth添加到一个MVC项目中,该项目在我的localhost上运行得很好但是当我部署到托管环境时,我收到报告错误与隔离存储有关。

我遵循之前的建议,即如果导致问题但是这似乎无法解决问题,则会停用报告。

我知道它失败了,因为它无法写入我的共享托管环境中的隔离存储。

所以问题:

为什么报告在禁用时仍然会出错?

有没有办法将隔离存储设置为使用网站可以访问的自定义文件夹,以便我可以保留报告?

由于

我的Web.config部分:

    <dotNetOpenAuth>
      <reporting enabled="false" />
    <!-- Relaxing SSL requirements is useful for simple samples, but NOT a good idea in production. -->
    <messaging relaxSslRequirements="true">
      <untrustedWebRequest>
        <whitelistHosts>
          <!-- Uncomment to enable communication with localhost (should generally not activate in production!) -->
        <add name="localhost" />
        </whitelistHosts>
      </untrustedWebRequest>
    </messaging>
    <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. -->

    <!-- This is an optional configuration section where aspects of dotnetopenauth can be customized. -->
    <!-- For a complete set of configuration options see http://www.dotnetopenauth.net/developers/code-snippets/configuration-options/ -->
    <openid>
      <relyingParty>
        <security requireSsl="false">
          <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
          <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
                        <add endpoint="https://www.google.com/accounts/o8/ud" />
                    </trustedProviders>-->
        </security>
        <behaviors>
          <!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
                         with OPs that use Attribute Exchange (in various formats). -->
          <add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" />
        </behaviors>
      </relyingParty>
      <provider></provider>
    </openid>
   </dotNetOpenAuth>

添加了“组部分:

”部分
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
    <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
    <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
    <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
    <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
</sectionGroup>

错误日志:

2015-07-24 12:52:58,249 [1] INFO  DotNetOpenAuth [(null)] - DotNetOpenAuth.Core, Version=4.1.4.12333, Culture=neutral, PublicKeyToken=2780ccd10d57b246 (official)
2015-07-24 12:52:58,342 [1] INFO  DotNetOpenAuth [(null)] - Reporting will use isolated storage with scope: Domain, Assembly, Machine
2015-07-24 12:52:58,374 [1] ERROR DotNetOpenAuth [(null)] - Error while trying to initialize reporting.
System.IO.IsolatedStorage.IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464)
   at System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName)
   at System.IO.IsolatedStorage.IsolatedStorageFile.Lock(Boolean& locked)
   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
   at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
   at DotNetOpenAuth.Reporting.GetOrCreateOriginIdentity()
   at DotNetOpenAuth.Reporting.Initialize()

0 个答案:

没有答案