2012-03-16 18 views
2

こんにちは私は誰かが私を助けることができるかどうか疑問に思っていますが、これは解決しようとしていますが、運がまだありません:(私のWCFはIIS6でホストされています、http://systemservices/ServiceManagerServices.svc私は私のブラウザでサービスにアクセスすることができ、WcfTestClientを使用してリクエストを送信しようとしたときしかし、私は次のエラーを取得する:。WCFホスティングの問題

> Error: Cannot obtain Metadata from 
> http://systemservices/ServiceManagerServices.svc If this is a Windows 
> (R) Communication Foundation service to which you have access, please 
> check that you have enabled metadata publishing at the specified 
> address. For help enabling metadata publishing, please refer to the 
> MSDN documentation at 
> http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange 
> Error URI: http://systemservices/ServiceManagerServices.svc 
> Metadata contains a reference that cannot be resolved: 
> 'http://systemservices/ServiceManagerServices.svc'. There was no 
> endpoint listening at http://systemservices/ServiceManagerServices.svc 
> that could accept the message. This is often caused by an incorrect 
> address or SOAP action. See InnerException, if present, for more 
> details. Unable to connect to the remote server No connection 
> could be made because the target machine actively refused it 
> 172.16.25.221:80HTTP GET Error URI: http://systemservices/ServiceManagerServices.svc There was an error 
> downloading 'http://systemservices/ServiceManagerServices.svc'. 
> Unable to connect to the remote server No connection could be made 
> because the target machine actively refused it 172.16.25.221:80 

私はそれが非常に多くの異なる値に私のweb.configファイルを変更しようとしています本当に歓迎すべきことは何ですか?

これは私のweb.configです

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
     <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 
      <section name="ServiceManager.Services.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
     </sectionGroup> 
    </configSections> 
    <system.web> 
     <customErrors mode="Off"/> 
     <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
     <services> 
      <service name="ServiceManager.Services.ServiceManagerServices" behaviorConfiguration="WCFServiceBehavior"> 
       <endpoint address="" binding="wsHttpBinding" contract="ServiceManager.Services.IServiceManagerServices" /> 
       <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
      </service> 
     </services> 
     <behaviors> 
      <serviceBehaviors> 
       <behavior name="WCFServiceBehavior"> 
        <serviceMetadata httpGetEnabled="True"/> 
        <serviceDebug includeExceptionDetailInFaults="True" /> 
       </behavior> 
      </serviceBehaviors> 
     </behaviors> 
    </system.serviceModel> 
    <system.webServer> 
     <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
</configuration> 

答えて

1

アクセス制限がある可能性がありますが、このメッセージは他の問題のために蹴ったときに表示される可能性があります。参照されているバイナリがないか、無効なDataContractまたは似たような。

まず、いくつかの診断をオンにします、

<system.diagnostics> 
    <sources> 
    <source name="System.ServiceModel" switchValue="Warning, ActivityTracing" propagateActivity="true"> 
     <listeners> 
     <add type="System.Diagnostics.DefaultTraceListener" name="Default"> 
      <filter type="" /> 
     </add> 
     <add name="ServiceModelTraceListener"> 
      <filter type="" /> 
     </add> 
     </listeners> 
    </source> 
    </sources> 
    <sharedListeners> 
    <add initializeData="path\to\trace.svclog" 
     type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
    name="ServiceModelTraceListener" traceOutputOptions="Timestamp"> 
    <filter type="" /> 
    </add> 
</sharedListeners> 

今すぐサービスを実行して、エラーを取得し、SvcTraceToolを使用して出力ログを開く(ちょうどProgram Files\Microsoft SDKsに行くとsvcの検索を行います) 。これにより、プロセスの概要がより分かりやすくなります。その時点では間違っていて、例外の詳細を指しています。イベントログで特定の例外を調べるように指示することもあります。

0

Unable to connect to the remote server No connection could be made because the target machine actively refused it 172.16.25.221:80

私はそれがファイアウォールの問題ではなく、web.configファイルの問題であると言うでしょう。あなたは80番ポートでそのアドレスにtelnetして応答できますか?