【问题标题】:DotNetOpenAuth OpenID Provider "Sequence contains more than one element"DotNetOpenAuth OpenID 提供者“序列包含多个元素”
【发布时间】:2010-04-27 19:47:08
【问题描述】:

我在使用 DNOA 3.4.3 实现我的 OpenID 提供程序时遇到了问题。在我也需要 AX 支持之前,一切都非常顺利。根据 Andrew 在http://groups.google.com/group/dotnetopenid/browse_thread/thread/5629a24c0a7e8d99 的建议,我在 Web 配置中设置了 AXFetchAsSregTransform。但是,这样做导致我在我的decision.aspx 页面上收到异常“序列包含多个元素”,但我无法通过它。

以下行引发异常:
编辑: 奇怪的是,这不再是引发错误的行。 SendResponse() 现在正在触发异常

ClaimsRequest requestedFields = ProviderEndpoint.PendingRequest.GetExtension();

ProviderEndpoint.SendResponse()

有什么想法吗?任何帮助将不胜感激!

导致错误的日志如下:

2010-04-28 12:38:20,247 (GMT-7) [5] 信息 DotNetOpenAuth.Messaging.Channel - 扫描传入的消息请求:https://myprovider/provider.ashx?openid.ns=http%3A%2F %2Fspecs.openid.net%2Fauth%2F2.0&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth %2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_request&openid.ext1.type.email=http%3A%2F %2Faxschema.org%2Fcontact%2Femail&openid.ext1.type.fullname=http%3A%2F%2Faxschema.org%2FnamePerson&openid.ext1.type.language=http%3A%2F%2Faxschema.org%2Fpref%2Flanguage&openid.ext1.required =email&openid.return_to=http%3A%2F%2Fmyrelyingparty%2Flogin.jsp%3Foidreturn%3D%252Fhome&openid.assoc_handle=%7B634080802953194640%7D%7BHxjFNw==%7D%7B20%7D&openid.realm=http%3A%2F%2Fmyreingly 2010-04-28 12:38:20,285 (GMT-7) [5] INFO DotNetOpenAuth.Messaging.Channel - 处理传入的 CheckIdRequest (2.0) 消息: openid.claimed_id:http://specs.openid.net/auth/2.0/identifier_select openid.identity:http://specs.openid.net/auth/2.0/identifier_select openid.assoc_handle: {634080802953194640}{HxjFNw==}{20} openid.return_to: http://myrelyingparty/login.jsp?oidreturn=%2Fhome openid.realm:http://myrelyingparty/ openid.mode: checkid_setup openid.ns:http://specs.openid.net/auth/2.0 openid.ns.ext1:http://openid.net/srv/ax/1.0 openid.ext1.mode: fetch_request openid.ext1.type.email:http://axschema.org/contact/email openid.ext1.type.fullname:http://axschema.org/namePerson openid.ext1.type.language:http://axschema.org/pref/language openid.ext1.required:电子邮件 2010-04-28 12:38:22,773 (GMT-7) [14] 信息 DotNetOpenAuth.Messaging.Channel - 扫描传入的消息请求:https://myprovider/login.aspx?ReturnUrl=%2fdecide.aspx 2010-04-28 12:38:36,167 (GMT-7) [5] 信息 DotNetOpenAuth.Messaging.Channel - 扫描传入的消息请求:https://myprovider/login.aspx?ReturnUrl=%2fdecide.aspx 2010-04-28 12:38:38,147 (GMT-7) [14] 错误 DotNetOpenAuth.Messaging - 协议错误:对领域 URL (http://myrelyingparty/) 的 HTTP 请求导致重定向,这是不允许的在依赖方发现期间。 在 DotNetOpenAuth.Messaging.ErrorUtilities.VerifyProtocol(布尔条件,字符串消息,对象 [] 参数) 在 DotNetOpenAuth.OpenId.Realm.Discover(IDirectWebRequestHandler requestHandler, Boolean allowRedirects) 在 DotNetOpenAuth.OpenId.Realm.DiscoverReturnToEndpoints(IDirectWebRequestHandler requestHandler, Boolean allowRedirects) 在 DotNetOpenAuth.OpenId.Provider.HostProcessedRequest.IsReturnUrlDiscoverableCore(OpenIdProvider 提供者) 在 DotNetOpenAuth.OpenId.Provider.HostProcessedRequest.IsReturnUrlDiscoverable(OpenIdProvider 提供者) 在 OpenIdProviderWebForms.decide.Page_Load(Object src, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,对象 o,对象 t,EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(对象发送者,EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequest(HttpContext 上下文) 在 ASP.decide_aspx.ProcessRequest(HttpContext 上下文) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously) 在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(异常错误) 在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext 上下文,AsyncCallback cb) 在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest WR,HttpContext 上下文) 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext,IntPtr nativeRequestContext,IntPtr moduleData,Int32 标志) 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext,IntPtr nativeRequestContext,IntPtr moduleData,Int32 标志) 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext,IntPtr nativeRequestContext,IntPtr moduleData,Int32 标志) 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext,IntPtr nativeRequestContext,IntPtr moduleData,Int32 标志) 2010-04-28 12:38:38,149 (GMT-7) [14] 信息 DotNetOpenAuth.Yadis - URL http://myrelyingparty/ 上的依赖方发现失败。 DotNetOpenAuth.Messaging.ProtocolException:对领域 URL (http://myrelyingparty/) 的 HTTP 请求导致重定向,这在依赖方发现期间是不允许的。 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\Messaging\ErrorUtilities.cs:line 235 中的 DotNetOpenAuth.Messaging.ErrorUtilities.VerifyProtocol(布尔条件,字符串消息,Object[] args) 在 DotNetOpenAuth.OpenId.Realm.Discover(IDirectWebRequestHandler requestHandler, Boolean allowRedirects) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Realm.cs:line 446 在 DotNetOpenAuth.OpenId.Realm.DiscoverReturnToEndpoints(IDirectWebRequestHandler requestHandler, Boolean allowRedirects) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Realm.cs:line 424 在 DotNetOpenAuth.OpenId.Provider.HostProcessedRequest.IsReturnUrlDiscoverableCore(OpenIdProvider provider) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Provider\HostProcessedRequest.cs:line 142 2010-04-28 12:38:42,076 (GMT-7) [8] 错误 OpenIdProviderWebForms.Global - 引发了未处理的异常。详细信息如下: System.Web.HttpUnhandledException:引发了“System.Web.HttpUnhandledException”类型的异常。 ---> System.InvalidOperationException:序列包含多个元素 在 System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 源) 在 DotNetOpenAuth.OpenId.Provider.Request.GetExtension[T]() 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Provider\Request.cs:line 176 在 DotNetOpenAuth.OpenId.Extensions.ExtensionsInteropHelper.ConvertSregToMatchRequest(IHostProcessedRequest 请求) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Extensions\ExtensionsInteropHelper.cs:line 180 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Behaviors\AXFetchAsSregTransform.cs:line 139 中的 DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform.DotNetOpenAuth.OpenId.Provider.IProviderBehavior.OnOutgoingResponse(IAuthenticationRequest 请求) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Provider\OpenIdProvider.cs:line 482 中的 DotNetOpenAuth.OpenId.Provider.OpenIdProvider.ApplyBehaviorsToResponse(IRequest 请求) 在 DotNetOpenAuth.OpenId.Provider.OpenIdProvider.SendResponse(IRequest request) 在 c:\TeamCity\buildAgent\work\bf9e2ca68b75a334\src\DotNetOpenAuth\OpenId\Provider\OpenIdProvider.cs:line 325 在 C:\Projects\OpenIdProviderWebForms\decide.aspx.cs:line 130 中的 OpenIdProviderWebForms.decide.Yes_Click(Object sender, EventArgs e) 在 System.Web.UI.WebControls.Button.OnClick(EventArgs e) 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(字符串 eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,字符串 eventArgument) 在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) --- 内部异常堆栈跟踪结束 --- 在 System.Web.UI.Page.HandleError(异常 e) 在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequest(HttpContext 上下文) 在 c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\7f580b93\b3e4d917\App_Web_tulh9ymv.1.cs:line 0 中的 ASP.decide_aspx.ProcessRequest(HttpContext context) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously)

【问题讨论】:

  • 能否请您提供导致错误的请求日志?
  • 更新:我针对 test-id.org 进行了测试(我在 Andrew 的另一篇文章中发现了它。真是个宝藏!),它返回相同的“多个序列”错误。此外,我的依赖方实施该行为也遇到了麻烦。刚刚发布到 Google Groups 上,我会在帖子获得批准后添加链接。

标签: c# asp.net dotnetopenauth openid-provider


【解决方案1】:

哎呀。您在 DotNetOpenAuth 中发现了一个错误。

修复签入v3.2 as 7cea654v3.4 as bd7c148。您可以在tomorrow's build 中获得修复。

【讨论】:

  • 正确!谢谢你的照顾,伙计。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-04-25
  • 1970-01-01
  • 1970-01-01
  • 2015-01-21
  • 2014-03-09
相关资源
最近更新 更多