【发布时间】:2012-10-25 10:39:02
【问题描述】:
我已经开始反复抛出 Azure 缓存错误。它似乎与过期的会话有关。这是一个随机样本 - 它发生在静态文件中。
事件代码:3005 事件消息:发生未处理的异常。 活动时间:10/25/2012 9:49:15 AM 活动时间(UTC):10/25/2012 9:49:15 AM 事件 ID:004e617f16854e59b7a857ca542ae9fc 事件序列:86004 事件发生:720 事件详细代码:0 应用信息: 应用域:/LM/W3SVC/1273337584/ROOT-1-129955415508042441 信任级别:完全 应用程序虚拟路径:/ 应用路径:E:\sitesroot\0\ 机器名称:RD00155D36A377 处理信息: 进程 ID:3332 进程名称:w3wp.exe 帐户名称:NT AUTHORITY\NETWORK SERVICE 异常信息: 异常类型:DataCacheException 异常消息:ErrorCode:SubStatus:Key 引用不存在。基于 Key 创建对象以修复错误。 在 Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody) 在 Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg,IMonitoringListener 监听器) 在 Microsoft.ApplicationServer.Caching.DataCache.InternalResetObjectTimeout(字符串键,TimeSpan newTimeout,字符串区域,IMonitoringListener 侦听器) 在 Microsoft.ApplicationServer.Caching.DataCache.c__DisplayClass68.b__67() 在 Microsoft.ApplicationServer.Caching.DataCache.ResetObjectTimeout(字符串键,TimeSpan newTimeout) 在 Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(操作动作) 在 Microsoft.Web.DistributedCache.DataCacheForwarderBase.ResetObjectTimeout(字符串键,时间跨度 newTimeout) 在 System.Web.SessionState.SessionStateModule.BeginAcquireState(对象源,EventArgs e,AsyncCallback cb,对象 extraData) 在 System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously) 索取资料: 请求网址:http://www.beko.co.uk/Scripts/jquery.nivo.slider.pack.js 请求路径:/Scripts/jquery.nivo.slider.pack.js 用户主机地址:80.2.72.81 用户: 是否经过身份验证:假 认证类型: 线程帐户名称:NT AUTHORITY\NETWORK SERVICE 线程信息: 线程 ID:11 线程帐户名称:NT AUTHORITY\NETWORK SERVICE 是否冒充:假 堆栈跟踪:在 Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody) 在 Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg,IMonitoringListener 监听器) 在 Microsoft.ApplicationServer.Caching.DataCache.InternalResetObjectTimeout(字符串键,TimeSpan newTimeout,字符串区域,IMonitoringListener 侦听器) 在 Microsoft.ApplicationServer.Caching.DataCache.c__DisplayClass68.b__67() 在 Microsoft.ApplicationServer.Caching.DataCache.ResetObjectTimeout(字符串键,TimeSpan newTimeout) 在 Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(操作动作) 在 Microsoft.Web.DistributedCache.DataCacheForwarderBase.ResetObjectTimeout(字符串键,时间跨度 newTimeout) 在 System.Web.SessionState.SessionStateModule.BeginAcquireState(对象源,EventArgs e,AsyncCallback cb,对象 extraData) 在 System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously)这里没有代码,在web.config中配置
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="[mycachename]" cachePort="22233" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="[mykey]"></messageSecurity>
</securityProperties>
</dataCacheClient>
<dataCacheClient name="SslEndpoint">
<hosts>
<host name="[mycachename]" cachePort="22243" />
</hosts>
<securityProperties mode="Message" sslEnabled="true">
<messageSecurity authorizationInfo="[mykey]"></messageSecurity>
</securityProperties>
</dataCacheClient>
</dataCacheClients>
编辑:会话状态配置如下:
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
<providers>
<add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" dataCacheClientName="default" />
</providers>
</sessionState>
我正在尝试了解是否有 a)我可以做的任何事情来解决这个问题 b)涉及哪些DLL,最新版本是什么,(所以我可以看看更新是否有帮助) c) 如果其他人看到这个。
它是在我做了很多应用程序更新之后开始的,并且还更新了 Azure 中的缓存大小。因此不确定原因是什么。我不会认为代码更改是负责任的,但我们可能已经更新了一些 DLL,因为我们在开发过程中使用的 PC 之一是新建的。
【问题讨论】:
-
您是否在 webconfig 中添加了自定义 sessionState 提供程序的配置?这是您在 webconfig 中添加的唯一部分以使用 azure 缓存来处理会话吗?
-
您是否也为 sslendpoint 添加了提供程序?
-
不是我上面问题中的
节吗?还有别的吗? -
据我说
中的提供者,您需要使用 dataCacheClientName="SslEndpoint" 添加另一个提供者。 -
/Scripts/jquery.nivo.slider.pack.js是如何添加到数据缓存中的?您有多个实例还是只有一个角色实例?
标签: c# asp.net-mvc-3 azure azure-caching