1

CRM4の一部としてデプロイされているカスタムWebサービスを呼び出そうとすると、次のエラーが発生します。

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
    The request failed with the error message:
    --
        <html>
            <head>
                <title>No Microsoft Dynamics CRM user exists with the specified domain name and user ID</title>
                <style>
        ...
                </style>
            </head>

            <body bgcolor="white">

                    <span><H1>Server Error in '/RecurrenceService' Application.<hr width=100% size=1 color=silver></H1>

                    <h2> <i>No Microsoft Dynamics CRM user exists with the specified domain name and user ID</i> </h2></span>

        ...

        <table width=100% bgcolor="#ffffcc">
                       <tr>
                          <td>
        [CrmException: No Microsoft Dynamics CRM user exists with the specified domain name and user ID]
           Microsoft.Crm.Authentication.WindowsAuthenticationProvider.Authenticate(HttpApplication application) +895
           Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application) +125
           Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application) +66
           Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e) +513
           System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
           System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

                          </td>
                       </tr>
                    </table>

                    <br>

                    <hr width=100% size=1 color=silver>

                    <b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

                    </font>

            </body>
        </html>
        <!-- 
        [CrmException]: No Microsoft Dynamics CRM user exists with the specified domain name and user ID
           at Microsoft.Crm.Authentication.WindowsAuthenticationProvider.Authenticate(HttpApplication application)
           at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application)
           at Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application)
           at Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e)
           at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
           at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
        -->
        --.

Webサービスを呼び出すためのコード:

RecurrenceService serv = new RecurrenceService();
serv.Credentials = System.Net.CredentialCache.DefaultCredentials;
string result = serv.UpdateSeries();

CRM4のURL:http://cw-dev-5/loader.aspx

カスタムサービスのURL:http://cw-dev-5/RecurrenceService/RecurrenceService.asmx

次のコードスニペットSystem.Security.Principal.WindowsIdentity.GetCurrent().Nameが返されますNT AUTHORITY\NETWORK SERVICE(エラーの原因だと思います)

誰かが私の問題を解決するための解決策を私に提案できますか?

4

4 に答える 4

0

これはASP.Netサイトから呼び出していますか?アプリケーションプールIDを、CRMサイトにアクセスできるドメインユーザーに変更する必要がある場合があります(現在、NT AUTHORITY \ NETWORK SERVICEを使用しようとしています)。

于 2009-02-13T12:29:27.467 に答える
0

CRM サーバーに複数の組織がある場合は、URL に組織名を入れる必要があります。

http://cw-dev-5/SomeOrgName/RecurrenceService/RecurrenceService.asmx

CRM はユーザーを認証し、その組織に存在するかどうかを確認するため、Web アプリケーションが CRM Web サイトにある場合は、これを行う必要があります。組織をオフのままにしておくと、デフォルトの組織が使用されます。

これがどのように機能するかについての MSDN ドキュメントは次のとおりです: Using Microsoft Dynamics CRM URLs

于 2009-11-17T01:08:27.757 に答える
0

はい、CRM サービスを呼び出している Web サービス

カスタム サービス URL: " http://cw-dev-5/RecurrenceService/RecurrenceService.asmx "

これは、CRM ユーザー管理で設定されているように、crm ユーザーとしてログオンする必要があります。

プラグインから呼び出している場合 - それも CRM でユーザーが設定されている ID である必要があります

于 2009-02-13T13:37:40.737 に答える
0

英語以外のオペレーティング システムを実行している可能性がありますか?

どういうわけか、ネットワーク サービスのログイン名は、OS が他の言語に翻訳されるときにローカライズされることがあります。

現在、多くのプログラムは、ログイン名が「NT AUTHORITY\NETWORK SERVICE」にハードコードされていることを想定しています。たとえば、ドイツ語版の Windows では、アカウントの名前は「NT-AUTORITÄT\NETZWERKDIENST」です。したがって、プログラムは英語名を探していますが、見つけることができず、エラーが表示されます。

これがあなたの問題に当てはまるかどうかはわかりませんが、チェックする価値があるかもしれません!

于 2009-05-07T12:40:19.110 に答える