2012-09-10 43 views
1

沒有端點監聽http:// localhost:6272/Service1.svc可以接受該消息。 這通常是由不正確的地址或SOAP操作引起的。如果存在,請參閱InnerException, 以獲取更多詳細信息。在http://localhost/Service1.svc沒有EndPoint監聽

的InnerException遠程服務器返回一個錯誤:NOTFOUND

我有2個解決方案項目

1. MyApp的(Windows應用程序)

2. WcfService1(類庫)

我的Web.Config

<?xml version="1.0"?> 
<configuration> 

<system.web> 
     <compilation debug="true" targetFramework="4.0" /> 
</system.web> 

<system.serviceModel> 

<client> 
    <endpoint address="http://localhost:6272/Service1.svc" binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1" 
    name="BasicHttpBinding_IService1" /> 
</client> 

<behaviors> 
    <serviceBehaviors> 
    <behavior> 
     <serviceMetadata httpGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

<bindings> 
    <basicHttpBinding> 
    <binding name="BasicHttpBinding_IService1" closeTimeout="00:10:00" 
     openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" 
     allowCookies="true" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
     maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
     messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
     useDefaultWebProxy="true"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
     maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <security mode="None"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
      realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 
    </binding> 
    </basicHttpBinding> 
</bindings> 

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
</system.serviceModel> 

<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer> 

</configuration> 

在我Service1.svc.cs我剛回國CookiesContainer對象客戶端(MyApp的)

我該怎麼辦?我的web.config文件中是否有任何更改?

+0

是您的服務託管?您可以從IE瀏覽器訪問http:// localhost:6272/Service1.svc並檢查服務是否正常運行。 –

+0

是的。我主持我的服務。這些都可以正常工作。但我不知道爲什麼會出現這個錯誤 – Amol

回答