Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
MethodAccessException in DotNetOpenAuth.OpenId.Identifi er..cctor()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Werner Strydom  
View profile  
 More options Apr 30 2012, 12:06 am
From: Werner Strydom <bloudr...@gmail.com>
Date: Sun, 29 Apr 2012 21:06:25 -0700 (PDT)
Local: Mon, Apr 30 2012 12:06 am
Subject: MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

I downloaded the latest version of 4.1.0.12085 of
DotNetOpenAuth.OpenId.RelyingParty library in an ASP.NET MVC 4 website
being developed in Visual Studio 2010. It is failing with the following
error:

[MethodAccessException: Attempt by method 'DotNetOpenAuth.OpenId.Identifier..cctor()' to access method 'DotNetOpenAuth.Messaging.Reflection.MessagePart.Map<DotNetOpenAuth.OpenId. Identifier>(System.Func`2<DotNetOpenAuth.OpenId.Identifier,System.String>, System.Func`2<DotNetOpenAuth.OpenId.Identifier,System.String>, System.Func`2<System.String,DotNetOpenAuth.OpenId.Identifier>)' failed.]
   DotNetOpenAuth.OpenId.Identifier..cctor() in c:\BuildAgent\work\35657a53ee36436f\src\DotNetOpenAuth.OpenId\OpenId\Identi fier.cs:33

[TypeInitializationException: The type initializer for 'DotNetOpenAuth.OpenId.Identifier' threw an exception.]
   DotNetOpenAuth.OpenId.Identifier.TryParse(String value, Identifier& result) in c:\BuildAgent\work\35657a53ee36436f\src\DotNetOpenAuth.OpenId\OpenId\Identi fier.cs:204

It worked fine before the update.

Werner


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Apr 30 2012, 12:34 am
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Sun, 29 Apr 2012 21:34:47 -0700
Local: Mon, Apr 30 2012 12:34 am
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

Let me know if this repros once you have a downloaded the latest version (
v4.1.0.12120 ).
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner Strydom  
View profile  
 More options Apr 30 2012, 1:34 am
From: Werner Strydom <bloudr...@gmail.com>
Date: Sun, 29 Apr 2012 22:34:42 -0700 (PDT)
Local: Mon, Apr 30 2012 1:34 am
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

That build sorted out that issue. However, My RP is not longer able to sign
in using my OP. The trace view follows. The RP is http://api.example.com/
and OP is http://accounts.example.com/.

w3wp.exe Information: 0 : Incoming HTTP request: GET
http://api.example.com/signin
w3wp.exe Information: 0 : HTTP GET http://accounts.example.com/
w3wp.exe Information: 0 : An XRDS response was received from GET at
user-supplied identifier.
w3wp.exe Information: 0 : Total services discovered in XRDS: 1
w3wp.exe Information: 0 : [{
ClaimedIdentifier: http://specs.openid.net/auth/2.0/identifier_select
ProviderLocalIdentifier: http://specs.openid.net/auth/2.0/identifier_select
ProviderEndpoint: http://accounts.example.com/openid
OpenID version: 2.0
Service Type URIs:
http://specs.openid.net/auth/2.0/server
http://axschema.org/contact/email

},]

w3wp.exe Information: 0 : Skipping HTML discovery because XRDS contained
service endpoints.
w3wp.exe Information: 0 : Performing discovery on user-supplied identifier:
http://accounts.example.com/
w3wp.exe Information: 0 : Creating authentication request for user supplied
Identifier: http://accounts.example.com/
w3wp.exe Information: 0 : Preparing to send CheckIdRequest (2.0) message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElementRelyingParty
applied to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.RelyingPartySecurityOptions did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.BackwardCompatibilityBindingElement
did not apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ReturnToNonceBindingElement did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ReturnToSignatureBindingElement did
not apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardReplayProtectionBindingElement
did not apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardExpirationBindingElement did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.RelyingPartySigningBindingElement did
not apply to message.
w3wp.exe Information: 0 : Sending message: CheckIdRequest
w3wp.exe Information: 0 : Redirecting to
http://accounts.example.com/openid?openid.claimed_id=http%3A%2F%2Fspe...
w3wp.exe Information: 0 : Incoming HTTP request: GET
http://accounts.example.com/openid?openid.claimed_id=http%3A%2F%2Fspe...
w3wp.exe Information: 0 : Incoming request received: CheckIdRequest
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ProviderSigningBindingElement did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardExpirationBindingElement did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardReplayProtectionBindingElement
did not apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement applied to
message.
w3wp.exe Information: 0 : HTTP GET http://api.example.com/
w3wp.exe Information: 0 : Preparing to send PositiveAssertionResponse (2.0)
message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement applied to
message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardReplayProtectionBindingElement
applied to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardExpirationBindingElement applied
to message.
w3wp.exe Information: 0 : Signing PositiveAssertionResponse message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ProviderSigningBindingElement applied
to message.
w3wp.exe Information: 0 : Sending message: PositiveAssertionResponse
w3wp.exe Information: 0 : Redirecting to
http://api.example.com/signin?dnoa.userSuppliedIdentifier=http%3A%2F%...
w3wp.exe Information: 0 : Incoming HTTP request: GET
http://api.example.com/signin?dnoa.userSuppliedIdentifier=http%3A%2F%...
w3wp.exe Information: 0 : Incoming request received:
PositiveAssertionResponse
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ReturnToSignatureBindingElement did
not apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.BackwardCompatibilityBindingElement
did not apply to message.
w3wp.exe Information: 0 : Verifying incoming PositiveAssertionResponse
message signature of: MOXLLazzQg90kSDgyAY9bTwZipwMXZ0o4r1H4Vf9IAY=
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.RelyingPartySigningBindingElement
applied to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardExpirationBindingElement applied
to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.Messaging.Bindings.StandardReplayProtectionBindingElement
applied to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ReturnToNonceBindingElement did not
apply to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.RelyingPartySecurityOptions applied
to message.
w3wp.exe Information: 0 : Binding element
DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElementRelyingParty
applied to message.
w3wp.exe Information: 0 : Verifying assertion matches identifier discovery
results...
w3wp.exe Information: 0 : HTTP GET
http://accounts.example.com/users/ad1c0b84248f45a9923c3f9e6c346a49
w3wp.exe Information: 0 : HTTP GET
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49
w3wp.exe Information: 0 : An XRDS response was received from GET at
user-supplied identifier.
w3wp.exe Information: 0 : Total services discovered in XRDS: 2
w3wp.exe Information: 0 : [{
ClaimedIdentifier:
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49
ProviderLocalIdentifier:
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49
ProviderEndpoint: http://accounts.example.com/openid
OpenID version: 2.0
Service Type URIs:
http://specs.openid.net/auth/2.0/signon
http://axschema.org/contact/email
}, {

ClaimedIdentifier:
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49
ProviderLocalIdentifier:
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49
ProviderEndpoint: http://accounts.example.com/openid
OpenID version: 1.0
Service Type URIs:
http://openid.net/signon/1.0
http://openid.net/extensions/sreg/1.1
http://axschema.org/contact/email
},]

w3wp.exe Information: 0 : Skipping HTML discovery because XRDS contained
service endpoints.
w3wp.exe Information: 0 : Incoming HTTP request: GET ...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Apr 30 2012, 9:46 am
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Mon, 30 Apr 2012 06:46:32 -0700
Local: Mon, Apr 30 2012 9:46 am
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

Hi Werner,

This *appears* to be the log from the RP.  Is that right?

What version of DNOA is on each site?  (You have 4.1.0.12120 on one of them
I believe, but I don't know which).

I'm quite puzzled by the fact that the log includes this:
w3wp.exe Information: 0 : Verifying assertion matches identifier discovery
results...
w3wp.exe Information: 0 : HTTP GET
http://accounts.example.com/users/ad1c0b84248f45a9923c3f9e6c346a49
w3wp.exe Information: 0 : HTTP GET
http://accounts.example.com/users/AD1C0B84248F45A9923C3F9E6C346A49

The RP appears to be verifying the identifier but is using *two* URLs to do
it, which seems wrong.  I don't know where it got the all-caps version
from.
And then yes, everything else appears to be doubled as well (although the
identifier is always lower case above the lines I've copied here).  So it
looks quite strange.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre

On Sun, Apr 29, 2012 at 10:34 PM, Werner Strydom <bloudr...@gmail.com>wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner Strydom  
View profile  
 More options Apr 30 2012, 11:59 am
From: Werner Strydom <bloudr...@gmail.com>
Date: Mon, 30 Apr 2012 08:59:40 -0700 (PDT)
Local: Mon, Apr 30 2012 11:59 am
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

Those were the outputs of both the RP (api.example.com) and OP
(http://accounts.example.com).  The entry about the double nonce was
written by the RP.  

I'll look into the issue around the uppercase.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner Strydom  
View profile  
 More options Apr 30 2012, 12:23 pm
From: Werner Strydom <bloudr...@gmail.com>
Date: Mon, 30 Apr 2012 09:23:56 -0700 (PDT)
Local: Mon, Apr 30 2012 12:23 pm
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

I noticed that a "Code Analysis" entry suggesting to use ToUpperInvariant
rather than ToLowerInvariant.  Changing it back to ToLowerInvariant sorted
the issue.  The RPs are working again. Many thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Apr 30 2012, 2:33 pm
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Mon, 30 Apr 2012 11:33:14 -0700
Local: Mon, Apr 30 2012 2:33 pm
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

Hi Werner,

Glad it's working for you now.  Why are you calling either ToLowerInvariant
or ToUpperInvariant?  Normalizing the claimed identifier, if that's what
you're doing, must be done a particular way (by redirect on the identifier
itself) to avoid security issues.  Is that what you're doing?
If you merge the logs like that I suggest you modify the appender in the
.config file so that it's clear which party is appending to the log for a
given line.
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Werner Strydom  
View profile  
 More options Apr 30 2012, 2:50 pm
From: Werner Strydom <bloudr...@gmail.com>
Date: Mon, 30 Apr 2012 11:50:45 -0700 (PDT)
Local: Mon, Apr 30 2012 2:50 pm
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

Hi Andrew,

Yes that is what I was doing. Notice in the OpenID Provider sample (in
Models.User) that ToLowerInvariant was called. I had a temporary lapse
of judgment and changed it to ToUpperInvariant when I was fixing code
analysis issues. However due to refactoring that code is called in two
places and only one was changed.

As for the logs, I don't use log4net but whatever gets written to the debug
output. That is the output I attached after I debugged both the OP and RP.
 Perhaps the trace statements should include some hint as to where
it originates from. The best way to do it is to assign numbers to the trace
statements, so that < 10000 is an OP, < 20000 is an RP etc etc.

One thing that may be rather useful is if logging/tracing included some
reference to the specifications as it is performing or validating
somethings. It would save us, who don't know the specifications by heart
and have to reference it often, a great deal of time.

I can create issues for both if you wish.

Werner


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options May 1 2012, 12:50 am
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Mon, 30 Apr 2012 21:50:02 -0700
Local: Tues, May 1 2012 12:50 am
Subject: Re: [dotnetopenauth] MethodAccessException in DotNetOpenAuth.OpenId.Identifier..cctor( )

I can't see myself adding numbers to all DNOA trace statements, honestly.
 And so much of the OpenID framework is shared between OP and RP that the
trace messages wouldn't have a unique prefix most of the time anyway.

I do tend to add comments that reference specific spec sections but I can
see that doesn't help when all you have is logging to go off of, so that's
a fine suggestion.  Feel free to file a ticket for it.  But what would be
helpful (since a complete canvasing of all log messages isn't going to
happen anytime soon) is to list specific messages where you'd like to see
the spec sections referenced.

Thanks for all the feedback!
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre

On Mon, Apr 30, 2012 at 11:50 AM, Werner Strydom <bloudr...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »