我使用DotNetOpenAuth 3.4.7和有效的消费者密钥和秘密.当我尝试在localhost(\ Samples\OAuthConsumer\SignInWithTwitter.aspx)上使用twitter登录时,它会崩溃并出现以下异常.
The remote server returned an error: (401) Unauthorized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
Source Error:
Line 190: }
Line 191: Uri callback = MessagingUtilities.GetRequestUrlFromContext().StripQueryArgumentsWithPrefix("oauth_");
Line 192: var request = TwitterSignIn.PrepareRequestUserAuthorization(callback, null, redirectParameters);
Line 193: return TwitterSignIn.Channel.PrepareResponse(request);
Line 194: }
Source …Run Code Online (Sandbox Code Playgroud)