使用 DotNetOpenAuth 时,Azure 开发结构因 SocketException 崩溃

2024-01-06

我正在尝试使用 DotNetOpenAuth OpenID 身份验证在 Windows Azure Dev Fabric 下运行 ASP.NET MVC 2 网站。

Azure Dev Fabric 本身反复崩溃(dfloadbalancer.exe),当我进行身份验证时。

对于允许使用 Azure Dev Fabric 和 DotNetOpenAuth 的问题,是否有任何解决方法?

MSDN好像有一些老讨论 http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/6681bd01-f9c7-456b-90d6-5b4151d8b99b/?prof=required关于已被放弃的同一问题。

System.Net.Sockets.SocketException was unhandled
  Message=An existing connection was forcibly closed by the remote host
  Source=System
  ErrorCode=10054
  NativeErrorCode=10054
  StackTrace:
       at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
       at Microsoft.ServiceHosting.Tools.DevelopmentFabric.LoadBalancer.ConnectionInfo.Release()
       at Microsoft.ServiceHosting.Tools.DevelopmentFabric.LoadBalancer.ServerConnector.Stop()
       at Microsoft.ServiceHosting.Tools.DevelopmentFabric.LoadBalancer.PacketForwarder.ProcessReceive(IAsyncResult result)
       at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Net.ContextAwareResult.Complete(IntPtr userToken)
       at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
       at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
       at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
  InnerException: 

崩溃前的最新日志消息是:

[WaWebHost.exe] Redirecting to http://www.myopenid.com/server?openid.claimed_id=http%3A%2F%2Fxxxxxx.myopenid.com%2F&openid.identity=http%3A%2F%2Fxxxxxx.myopenid.com%2F&openid.assoc_handle=xxxxxxx&openid.return_to=http%3A%2F%2F127.0.0.1%2Fuser%2FAuthenticate%3FReturnUrl%3D%26dnoa.userSuppliedIdentifier%3Dhttp%253A%252F%252Fxxxxxxxx.myopenid.com%252F&openid.realm=http%3A%2F%2F127.0.0.1%2F&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
[fabric] Role state Unresponsive

我在使用以下语句时遇到了这个问题:

return request.RedirectingResponse.AsActionResult();

我通过将该行更改为:

string location = request.RedirectingResponse.Headers["Location"];
return Redirect(location);

由于我不知道的原因,这解决了错误并允许我回到正题,而无需对我的开发环境进行任何特殊更改。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 DotNetOpenAuth 时,Azure 开发结构因 SocketException 崩溃 的相关文章

随机推荐