Openid 使用DotNetOpenAuth时Azure dev结构因SocketException崩溃

Openid 使用DotNetOpenAuth时Azure dev结构因SocketException崩溃,openid,crash,azure,dotnetopenauth,Openid,Crash,Azure,Dotnetopenauth,我正在尝试使用DotNetOpenAuth OpenID身份验证在Windows Azure开发结构下运行ASP.NET MVC 2网站 当我进行身份验证时,Azure Dev fabric本身反复崩溃(dfloadbalancer.exe) 是否存在允许使用Azure Dev fabric和DotNetOpenAuth的解决方案 MSDN似乎在相同的问题上有一些已经被放弃了 System.Net.Sockets.SocketException was unhandled Message=A

我正在尝试使用DotNetOpenAuth OpenID身份验证在Windows Azure开发结构下运行ASP.NET MVC 2网站

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

是否存在允许使用Azure Dev fabric和DotNetOpenAuth的解决方案

MSDN似乎在相同的问题上有一些已经被放弃了

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);

由于我不知道的原因,这绕过了错误,使我能够重新开始工作,而无需对我的开发环境进行任何特殊更改。

我只能说“它适合我”。你能添加一个相关的代码片段来说明你是如何进行重定向的吗?我没有进行重定向。来自DotNetOpenAuth记录器的。实现与随库分发的简单ASP.NET MVC应用程序相匹配。看起来问题出在负载平衡器中,它在重定向发生后不知何故阻塞了它。+1。谢谢你提供的信息!我在Windows Azure论坛上发布了一个查询:不幸的是,这对我不起作用,几年后仍在发生。
AsActionResult()
是最好的代码,因为当重定向格式化为脚本表单帖子而不是带有位置头的301重定向时,它不会随机失败。我怀疑崩溃可能是由于web.config文件中缺少绑定重定向。确保MVC从1.0到实际使用的版本有适当的重定向。