0

こんにちは私はサーバーマシンにWCFWebサービスを展開しました。ブラウザで閲覧できます。しかし、開発マシン上のWebアプリケーションにサービス参照を追加しようとすると、次の詳細エラーが発生します。

メタデータには、解決できない参照が含まれています:'http:// ServerMachineName:500 / ITCAMSWebService_deploy / Services / Authentication.svc?wsdl'。WSDLドキュメントには、解決できなかったリンクが含まれています。'http:// ServerMachineName:500 / ITCAMSWebService_deploy / Services / Authentication.svc?xsd=xsd0'のダウンロード中にエラーが発生しました。基になる接続が閉じられました:受信時に予期しないエラーが発生しました。トランスポート接続からデータを読み取れません:既存の接続がリモートホストによって強制的に閉じられました。既存の接続がリモートホストによって強制的に閉じられましたメタデータには、解決できない参照が含まれています:'http:// ServerMachineName:500 / ITCAMSWebService_deploy / Services/Authentication.svc'。コンテンツタイプapplication/soap + xml; http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc。クライアントとサービスのバインディングが一致していない可能性があります。リモートサーバーがエラーを返しました:(415)コンテンツタイプ'application / soap + xml;のため、メッセージを処理できません。charset =utf-8'は予期されたタイプ'text/xmlではありませんでした。charset = utf-8'..サービスが現在のソリューションで定義されている場合は、ソリューションをビルドして、サービス参照を再度追加してみてください。

サーバーのWeb.configで生成されたサービスモデルセクションは次のとおりです。

<system.serviceModel>
      <services>
          <service name="Authentication" behaviorConfiguration="Behavior_Authentication">
              <host>
                  <baseAddresses>
                      <add baseAddress="http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc"></add>
                  </baseAddresses>
              </host>
              <endpoint address="" contract="IAuthentication" binding="basicHttpBinding" bindingConfiguration="ITCAMSWebService.IAuthentication" />

          </service>
      </services>
    <behaviors>


      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true" />
            <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
      </serviceBehaviors>


    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
  </system.serviceModel>
4

2 に答える 2

1

解決しました!!! Everyoneサーバー上のC:\ Windows\Tempへの完全な権限を持つユーザーを追加する。IISには、サーバーのTempフォルダーにメタデータファイルを生成する権限が必要です。

于 2012-06-14T10:32:54.757 に答える
0

ServerMachineName の代わりにサーバーの IP アドレスをアドレスに指定し、クライアントとサーバーの両方のバインディングも確認してください。

于 2012-06-14T06:45:53.230 に答える