Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# OAuth 2.0示例DotNetOpenAuth不工作_C#_.net_Oauth_Oauth 2.0_Dotnetopenauth - Fatal编程技术网

C# OAuth 2.0示例DotNetOpenAuth不工作

C# OAuth 2.0示例DotNetOpenAuth不工作,c#,.net,oauth,oauth-2.0,dotnetopenauth,C#,.net,Oauth,Oauth 2.0,Dotnetopenauth,我从Github Branchs\v5.0\src\构建了最新版本的DotNetOpenAuth项目,并运行了OAuth2示例应用程序。我从localhost:59722开始验证示例AuthorizationServer和ResourceServer。我必须在下面的三个.cs文件中进行更改,以使示例正常工作。如果有人告诉我是否存在已知问题或我缺少一些配置,我将不胜感激 OAuthClient项目:SampleWCF2.cs:注释掉第64行: 重定向(请求路径) Product/DotNetOpe

我从Github Branchs\v5.0\src\构建了最新版本的DotNetOpenAuth项目,并运行了OAuth2示例应用程序。我从localhost:59722开始验证示例AuthorizationServer和ResourceServer。我必须在下面的三个.cs文件中进行更改,以使示例正常工作。如果有人告诉我是否存在已知问题或我缺少一些配置,我将不胜感激

  • OAuthClient项目:SampleWCF2.cs:注释掉第64行:

    重定向(请求路径)

  • Product/DotNetOpenAuth.OAuth2项目:AccessToken.cs:注释掉第54行:

    需要(signingKey==null | |!signingKey.PublicOnly,“signingKey”,“需要私钥”)

  • Product/DotNetOpenAth.OAuth2.Client项目:OAuth2ClientChannel.cs加载项第102行:

    //hack added to because contentType of text/html is returned for json
    if(contentType == "text/html" && body != null && body[0] == '{')
    {
        return this.DeserializeFromJson(body);
    }else if (contentType == JsonEncoded || contentType == JsonTextEncoded) {
    

  • 我在运行localhost时遇到了一个问题。主要是因为Facebook没有重定向到localhost。我不得不在我的主机文件中添加一行代码来伪造一个真实的域