asp.net - The HTTP verb HEAD is unrecognized and unsupported -
after attaching of great dotnetopenauth project site, have got lot of unhandled exceptions below. please me this?
event message: unhandled exception has occurred. event time: 1/9/2010 5:59:04 event time (utc): 1/9/2010 11:59:04 event id: fa8b51280ff94c52b24658def6e0a530 event sequence: 9 event occurrence: 1 event detail code: 0 process information: process id: 3568 process name: w3wp.exe account name: nt authority\network service exception information: exception type: system.argumentexception exception message: http verb 'head' unrecognized , unsupported. parameter name: httpverb request information: request url: http://www.amiproject.com/ request path: / user host address: xxx.xxx.xxx.xxx user: authenticated: false authentication type: thread account name: nt authority\network service thread information: thread id: 8 thread account name: nt authority\network service impersonating: false stack trace: @ dotnetopenauth.messaging.errorutilities.throwargumentnamed(string parametername, string message, object[] args) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\messaging\errorutilities.cs:line 321 @ dotnetopenauth.messaging.messagingutilities.gethttpdeliverymethod(string httpverb) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\messaging\messagingutilities.cs:line 663 @ dotnetopenauth.messaging.messagingutilities.getrecipient(httprequestinfo request) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\messaging\messagingutilities.cs:line 647 @ dotnetopenauth.oauth.channelelements.oauthchannel.readfromrequestcore(httprequestinfo request) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\oauth\channelelements\oauthchannel.cs:line 150 @ dotnetopenauth.messaging.channel.readfromrequest(httprequestinfo httprequest) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\messaging\channel.cs:line 372 @ dotnetopenauth.oauth.serviceprovider.readrequest(httprequestinfo request) in c:\buildagent\work\7ab20c0d948e028f\src\dotnetopenauth\oauth\serviceprovider.cs:line 222 @ relyingpartylogic.oauthauthenticationmodule.context_authenticaterequest(object sender, eventargs e) in c:\my data\project\amiproject source\relyingpartylogic\oauthauthenticationmodule.cs:line 60 @ system.web.httpapplication.synceventexecutionstep.system.web.httpapplication.iexecutionstep.execute() @ system.web.httpapplication.executestep(iexecutionstep step, boolean& completedsynchronously) ---------------
you found bug. thanks. i've filed it.
in meantime, can workaround modifying relyingpartylogic oauthauthenticationmodule.cs file's context_authenticaterequest
method this:
private void context_authenticaterequest(object sender, eventargs e) { // don't read oauth messages directed @ oauth controller or else we'll fail nonce checks. if (this.isoauthcontrollerrequest()) { return; } if (httpcontext.current.request.httpmethod != "head") { // workaround: avoid involving oauth head requests. idirectedprotocolmessage incomingmessage = oauthserviceprovider.serviceprovider.readrequest(new httprequestinfo(this.application.context.request)); var authorization = incomingmessage accessprotectedresourcerequest; if (authorization != null) { this.application.context.user = oauthserviceprovider.serviceprovider.createprincipal(authorization); } } }
Comments
Post a Comment