DotNetOpenAuth SignInWithTwitter示例不起作用

时间:2011-09-27 12:08:11

标签: asp.net dotnetopenauth

我使用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 File: C:\Users\Andrey\Downloads\DotNetOpenAuth-3.4.7.11121\DotNetOpenAuth-3.4.7.11121\Samples\DotNetOpenAuth.ApplicationBlock\TwitterConsumer.cs    Line: 192 

TwitterConsumer最新更新时间为2010年3月7日。(https://github.com/AArnott/dotnetopenid/blob/v3.4/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs)

这个样本还活着吗?

1 个答案:

答案 0 :(得分:5)

这是我的坏事。我没有在app个人资料中指定回调网址。