I've just been spending hours on an issue that some others have reported to experience too. The Sample.Oauth2.OAuthClient projet sample does not work for me.
Let me explain in details: I got the latest version of dotnetopenauth from github (december 12th) I ensured to "unblock" the zip before extracting all files. I opened the solution with VS2012 (under Win7) When starting the Sample.Oauth2.OAuthClient project, the overall build process succeed.
The website is started.
When calling Sign in with Facebook (OAuth 2.0) I get
Attempt by method 'DotNetOpenAuth.OAuth2.WebServerClient+d__3.MoveNext()' to access method 'System.Collections.Generic.List`1..ctor()' failed.
Line 106: // verifiable for the same user/session.
Line 107: // If the host is implementing the authorization tracker though, they're handling this protection themselves.
Line 108: var cookies = new List();
Line 109: if (this.AuthorizationTracker == null) {
Line 110: string xsrfKey = MessagingUtilities.GetNonCryptoRandomDataAsBase64(16, useWeb64: true);
That the provided code is not able to access "System.Collections.Generic.List" bewilders me...
I tried the following : adding
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>
to web.config.
Note that checking just before the line the "CurrentTrustLevel" results in "Unrestricted".
I tried to publish to local IIS 7, tried running the pool under "administrator"
and finally
I tried with VS2013 on another, "clean" installation of Win7,
All attempts lead to the same result ...
It seems that the errors comes from some System.Net Dlls provided with the samples : they cannot be run by asp.net for security reasons (?)
Any idea ?