1

DNOAとMVC4WebAPIの統合に関する推奨事項を調査したいと思います。現在、DNOAリソースサーバーの実装には次の2つのオーバーロードがあり、HttpRequestBaseまたはHttpRequestMessagePropertyを入力として受け取りますが、タイプの非互換性のため、これらのメソッドは新しいMVC4WebAPIメッセージ委任ハンドラーと互換性がなくなりました。委任ハンドラーはSystem.Net.Http.HttpRequestMessageの周りにあります。

    /// <summary>
    /// Discovers what access the client should have considering the access token in the current request.
    /// </summary>
    public virtual IPrincipal GetPrincipal(HttpRequestBase httpRequestInfo = null, params string[] requiredScopes) 

    /// <summary>
    /// Discovers what access the client should have considering the access token in the current request.
    /// </summary>
    public virtual IPrincipal GetPrincipal(HttpRequestMessageProperty request, Uri requestUri, params string[] requiredScopes)  

HTTPモジュールで起動して実行できますが、MVC4 Web API、特に委任ハンドラーでのDNOAの使用目的を確認したいと思います。

4

1 に答える 1

0

ネイティブサポートには未解決の問題HttpRequestMessageがあります。それが利用可能になるまで、このメーリングリストのディスカッションでは、いくつかの回避策とサンプルへのリンクを含め、この質問を完全にカバーしています。

于 2012-08-23T15:25:21.650 に答える