【问题标题】:DotNetOpenAuth 4.0 and HTTPRequestInfo, NerdDinner 2.0DotNetOpenAuth 4.0 和 HTTPRequestInfo、NerdDinner 2.0
【发布时间】:2012-09-28 19:28:43
【问题描述】:

我使用 NerdDinner 2.0 作为学习 DotNetOpenAuth 的基础。顺便说一句,伟大的项目。我使用基于运行时版本 v2.0.50727(随项目提供)构建的 DotNetOpenAuth DLL 使其工作。我想升级到基于运行时版本 v4.0.20926 构建的 DotNetOpenAuth DLL,但在 AuthController.cs 文件中出现以下编译时错误...

HttpRequestInfo clientResponseInfo = new HttpRequestInfo("GET", auth, auth.PathAndQuery, headers, null);

例外:

DotNetOpenAuth.Messaging.HttpRequestInfo 不包含采用 5 个参数的构造函数。

显然我不知道 v4.0.20926 中的等效代码是什么。 非常感谢任何帮助。

【问题讨论】:

    标签: asp.net-mvc-3 dotnetopenauth nerddinner


    【解决方案1】:

    尝试将其替换为:

    HttpRequestBase clientResponesInfo = HttpRequestInfo.Create("GET", auth, headers, null);
    

    【讨论】:

    • 感谢您的回复安德鲁。我最终这样做了……希望它是正确的。 HttpRequestBase clientResponseInfo = HttpRequestInfo.Create("GET", auth, headers:headers, inputStream:null);现在,我在这一行收到一个错误... response = RelyingParty.GetResponse(clientResponseInfo);错误是...无法从“System.Web.HttpRequestBase”转换为“DotNetOpenAuth.Messaging.HttpRequestInfo”
    • @RickStickles,我很想看到您在评论中提到的“无法转换”错误的异常调用堆栈。你能pastebin.com给我发个链接吗?
    • 对不起,安德鲁,但我切换到最新版本的 NerdDinner,我不再有这个问题。我遇到问题时使用的是 ND 2.0。
    猜你喜欢
    • 2012-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-20
    • 2014-05-05
    • 2015-02-16
    • 2013-07-18
    • 1970-01-01
    相关资源
    最近更新 更多