过去一个月,我使用ASP.NET MVC(.NET 4.6)在azure中运行了一个Web应用程序。
直到现在一切正常,但突然之间,我看到以下异常被不断抛出:
Microsoft.WindowsAzure.Storage.StorageException:底层 连接已关闭:接收时发生意外错误。 ---> System.Net.WebException:底层连接已关闭:An 接收时发生意外错误。 ---> System.ComponentModel.Win32Exception:客户端和服务器不能 沟通,因为他们没有共同的算法 System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule,String包,CredentialUse intent,SecureCredential scc) 在 System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage,SecureCredential& secureCredential)at System.Net.Security.SecureChannel.AcquireClientCredentials(字节[]&安培; thumbPrint)at System.Net.Security.SecureChannel.GenerateToken(Byte []输入,Int32 offset,Int32 count,Byte []&输出)at System.Net.Security.SecureChannel.NextMessage(字节[]传入,Int32 offset,Int32 count)at System.Net.Security.SslState.StartSendBlob(Byte [] incoming,Int32 count,AsyncProtocolRequest asyncRequest)at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte [] buffer,AsyncProtocolRequest asyncRequest)at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)at System.Net.TlsStream.CallProcessAuthentication(Object state)at System.Threading.ExecutionContext.RunInternal(执行上下文 executionContext,ContextCallback回调,对象状态,布尔值 preserveSyncCtx)at System.Threading.ExecutionContext.Run(执行上下文 executionContext,ContextCallback回调,对象状态,布尔值 preserveSyncCtx)at System.Threading.ExecutionContext.Run(执行上下文 executionContext,ContextCallback回调,对象状态)at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
在System.Net.TlsStream.Write(Byte []缓冲区,Int32偏移量,Int32大小) 在System.Net.PooledStream.Write(Byte []缓冲区,Int32偏移量,Int32 System.Net.ConnectStream.WriteHeaders(Boolean async)的大小) ---内部异常堆栈跟踪结束---在System.Net.HttpWebRequest.GetResponse()处 Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync [T](RESTCommand1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 695 --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand
1 cmd,IRetryPolicy策略,OperationContext operationContext)in c:\ Program Files (86)\詹金斯\工作空间\ release_dotnet_master \ LIB \ ClassLibraryCommon \核心\执行人\ Executor.cs:线 604在 Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Exists(布尔 primaryOnly,BlobRequestOptions requestOptions,OperationContext operationContext)在c:\ Program Files中 (86)\詹金斯\工作空间\ release_dotnet_master \ LIB \ ClassLibraryCommon \斑点\ CloudBlobContainer.cs:线 1406 at BoligsideUtility.ImageService.GetBlockBlob(String containerName,String blobName)in C:\ Users \用户NM \收存箱\项目\ Boligside \ BoligsideUtility \ ImageService.cs:线 59在BoligsideUtility.ImageService.GetImageUrl(ResImage img)中 C:\ Users \用户NM \收存箱\项目\ Boligside \ BoligsideUtility \ ImageService.cs:线 71在Boligside.ViewModels.ResImageVm..ctor(ResImage image)中 C:\ Users \用户NM \收存箱\项目\ Boligside \ Boligside \的ViewModels \ ImageViewModels.cs:线 22在Boligside.ViewModels.ReviewVm..ctor(Review r)in C:\ Users \用户NM \收存箱\项目\ Boligside \ Boligside \的ViewModels \ ReviewVms.cs:线 74在Boligside.ViewModels.HomeVm。<> c。< .ctor> b__21_2(回顾x)in C:\ Users \用户NM \收存箱\项目\ Boligside \ Boligside \的ViewModels \ HomeViewModel.cs:线 35在System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()
1..ctor(IEnumerable
at System.Collections.Generic.List1 collection)
1 source)at at Boligside.ViewModels.HomeVm..ctor(RealestateSiteDbContext context)in C:\ Users \用户NM \收存箱\项目\ Boligside \ Boligside \的ViewModels \ HomeViewModel.cs:线 35在Boligside.Controllers.HomeController.Index()中 C:\ Users \用户NM \收存箱\项目\ Boligside \ Boligside \控制器\ HomeController.cs:线 129在lambda_method(Closure,ControllerBase,Object [])at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller,Object []参数)at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary
at System.Linq.Enumerable.ToList[TSource](IEnumerable2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 参数)at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult的 asyncResult,ActionInvocation innerInvokeState)at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() 在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult的 asyncResult)at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() 在 System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters<> c__DisplayClass46.b__3f() 在 System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass33.b__32(IAsyncResult asyncResult)at at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() 在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult的 asyncResult)at System.Web.Mvc.Async.AsyncControllerActionInvoker<> c__DisplayClass21<> c__DisplayClass2b.b__1c() 在 System.Web.Mvc.Async.AsyncControllerActionInvoker<> c__DisplayClass21.b__1e(IAsyncResult的 asyncResult)
发生异常的行是这一行:
CloudBlobContainer container = BlobClient.GetContainerReference(containerName);
在这一行中,我基本上调用了azure blob API来获取相应容器名称的容器引用。
奇怪的是;我再次发布了我的项目,错误消失了。
但是,第二天(今天)错误再次出现。