2011-07-13 18 views
2

IIS7を適用したWindows Server 2008 R2があります。私はそれにWCFサービスを展開しました。ブラウザ(ローカルまたは外部のマシン)でWCFサービスアドレスを指定すると、ブラウザでサービスの説明が表示されます。http://sbkisourcedev01/VCIndex/Calculator.svc?wsdlしかし、私はエラー以下になっていますそのサービスにプロジェクトへの参照を追加しようとしているとき:WCF IISサーバー構成

 
The document was understood, but it could not be processed. 

    - The WSDL document contains links that could not be resolved. 
    - There was an error downloading 'http://sbkisourcedev01/VCIndex/Calculator.svc?xsd=xsd0'. 
    - The underlying connection was closed: An unexpected error occurred on a receive. 
    - Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. 
    - An existing connection was forcibly closed by the remote host 

Metadata contains a reference that cannot be resolved: 'http://sbkisourcedev01/VCIndex/Calculator.svc?wsdl'. 
Content Type application/soap+xml; charset=utf-8 was not supported by service http://sbkisourcedev01/VCIndex/Calculator.svc?wsdl. The client and service bindings may be mismatched. 
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. 
If the service is defined in the current solution, try building the solution and adding the service reference again. 

私は、Windows 7上で実行されているこのサービスを持っており、それは大丈夫です。だから、私はW2K8のIIS構成設定に何かがあると信じています。事前に

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="basicHttpBindingConfig" /> 
     </basicHttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="serviceBehavior"> 
      <serviceMetadata httpGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <services> 
     <service behaviorConfiguration="serviceBehavior" 
       name="WCFVCIndex.Calculator"> 
     <endpoint address="" 
        binding="basicHttpBinding" 
        contract="WCFVCIndex.ICalculator" 
        bindingConfiguration="basicHttpBindingConfig" /> 
     <endpoint address="mex" 
        binding="mexHttpBinding" 
        contract="IMetadataExchange" /> 
     </service> 
    </services> 
    </system.serviceModel> 

ありがとう:

は、ここに私の設定ファイルです。

答えて

7

問題はWCF IDのアクセス許可で問題でした。 WCFサービスをホストするアプリケーションプールに使用されるIDには、%WINDIR%\ tempフォルダに対する完全なNTFSアクセス許可が必要です。そのアクセス許可をC:\ Windows \ Tempの自分のID(LOCAL SERVICE)に変更した後、WCFサービスにサービス参照を追加することができました。

+0

ありがとう、あなたはちょうど私の一日を救った! +1 –

+0

どうやってそれをしますか?これらの手順について言及できますか? – SamekaTV

1

あなたはhttp://sbkisourcedev01/VCIndex/mexを試しましたか?

+0

ありがとうございます。うまく行かなかった。このエラーが発生しました: 'http:// sbkisourcedev01/VCIndex/mex'のダウンロード中にエラーが発生しました。 要求がHTTPステータス404で失敗しました:見つかりません。 メタデータには解決できない参照が含まれています: 'http:// sbkisourcedev01/VCIndex/mex'。 –

関連する問題