ASP Provider 项目在 Azure 环境中失败

发布于 2024-11-03 18:24:59 字数 2101 浏览 4 评论 0原文

最近,我在新服务器中部署 Azure 应用程序时遇到了一个奇怪的错误。我正在使用 ASP 提供程序(由 microsoft 通过 Azure SDK 代码示例提供)。不管上传了多少次,我都会收到这个丑陋的大消息。请帮忙!

Error in '/' Application. --------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Samples.ServiceHosting.AspProviders.<>c__DisplayClass5.<ResetItemTimeout>b__4() in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\TableStorageSessionStateProvider.cs:497
Microsoft.Samples.ServiceHosting.AspProviders.ProviderRetryPolicies.RetryNImpl(Action action, Int32 numberOfRetries, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\SecUtil.cs:439
Microsoft.Samples.ServiceHosting.AspProviders.<>c__DisplayClass1.<RetryN>b__0(Action action) in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\SecUtil.cs:395
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +739 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +114 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +370
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

I'm recently getting a strange error while deploying my Azure application in a new Server. I'm using ASP Providers (supplied by microsoft with Azure SDK code samples). Regardless of several uploads i'm getting this big ugly message. Please help!

Error in '/' Application. --------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Samples.ServiceHosting.AspProviders.<>c__DisplayClass5.<ResetItemTimeout>b__4() in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\TableStorageSessionStateProvider.cs:497
Microsoft.Samples.ServiceHosting.AspProviders.ProviderRetryPolicies.RetryNImpl(Action action, Int32 numberOfRetries, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\SecUtil.cs:439
Microsoft.Samples.ServiceHosting.AspProviders.<>c__DisplayClass1.<RetryN>b__0(Action action) in C:\Users\upload.user\Desktop\Deployments\Deployment 2.20_A\AspProviders\SecUtil.cs:395
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +739 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +114 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +370
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无力看清 2024-11-10 18:24:59

是的 AppFabric Cache 已由微软正式发布并提供支持。此链接对教程有很大帮​​助:http://msdn.microsoft.com/en-us/ gg457897
然而,使用这种方法还有一个额外的计费方面,而 Tablestoragesessionprovider 使用 BlobStorage 却是微不足道的。

Yes AppFabric Cache is officially released and supported by microsoft. THis link is of great help for tutorial: http://msdn.microsoft.com/en-us/gg457897
However, there's an additional billing aspect to using this approach whereas Tablestoragesessionprovider uses BlobStorage which is peanuts.

陌路黄昏 2024-11-10 18:24:59

这些示例的优点是提供了代码,因此您通常可以更仔细地了解出了什么问题。我已经查看过,您收到此错误的最可能原因是会话状态提供程序的配置存在错误(它可能指向错误的帐户)或表和容器不存在那个账户。

有可能没有可用的会话对象,但我发现这不太可能。

话虽如此,表存储会话提供程序是 不适合在生产环境中发布。您最好使用 SQL Server 会话提供程序pp Fabric 缓存会话提供程序

The advantage with these samples is that the code is provided so you can generally get a closer look at what's going wrong. I've taken a look and the most likely reason for you getting this error is that there is an error in the configuration of the session state provider (it might be pointing at the wrong account) or the table and container don't exist at that account.

There's a chance that there is just no session object available, but I find that unlikely.

Having said that, the Table Storage Session provider is not suitable for releasing in a production environment. You're much better off either using the SQL Server session provider or the App Fabric cache session provider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文