2012-03-02 57 views
0

我們已將WPF應用程序(.NET 4)部署到公司網絡。應用程序不能直接訪問數據庫。應用程序使用WCF服務與數據庫對話。如果用戶試圖登錄到他會得到一個錯誤WCF - 未找到端點 - 公司網絡中的錯誤

有沒有終點在 http://oururl/dataportal/wcfportal.svc是可以接受的消息監聽的應用。 這通常是由不正確的地址或SOAP操作引起的。查看內部 異常(如果存在),以獲取更多詳細信息。

但是,如果客戶試圖在Fiddler在後臺運行時登錄,那麼它一切正常。請參閱下面的app.config文件。任何幫助診斷問題將不勝感激。

<configuration> 
    <system.serviceModel> 
    <!-- ZIP Enabled Dataportal --> 
    <extensions> 
     <bindingElementExtensions> 
     <add name="gzipMessageEncoding" 
      type="Microsoft.ServiceModel.Samples.GZipMessageEncodingElement, GZipEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> 
     </bindingElementExtensions> 
    </extensions> 
    <client>   
     <endpoint name="WcfDataPortal" 
      address="http://oururl/dataportal/wcfportal.svc" 
      binding="customBinding" 
      bindingConfiguration="dataportalCompressed" 
      contract="Csla.Server.Hosts.IWcfPortal" />  
     <metadata> 
     <policyImporters> 
      <extension type="Microsoft.ServiceModel.Samples.GZipMessageEncodingBindingElementImporter, GZipEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> 
     </policyImporters> 
     </metadata> 
    </client> 
    <bindings> 
     <customBinding> 
     <binding name="dataportalCompressed"> 
      <gzipMessageEncoding innerMessageEncoding="textMessageEncoding"/> 
      <httpTransport hostNameComparisonMode="StrongWildcard" 
       manualAddressing="False" maxReceivedMessageSize="6553600" 
       authenticationScheme="Anonymous" bypassProxyOnLocal="False" 
       realm="" useDefaultWebProxy="True" />   
     </binding> 
     </customBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="SSL_ServiceBehavior"> 
      <serviceMetadata httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

回答

0

首先檢查是否可以從瀏覽器訪問SVC文件。可能存在代理問題。

+0

是的,可以從瀏覽器訪問SVC文件。只是爲了澄清,如果您嘗試從客戶的公司網絡外部訪問,該應用程序就可以工作。從網絡內部,只有當你在後臺運行提琴手時才能使用。 – user1244754 2012-03-02 11:56:12