2014-10-28 126 views
1

我正在创建一个简单的wcf Web服务,它允许用户从数据库表中提取数据。执行后如果我在网络浏览器中查看服务,我会得到下面的页面在客户端测试中测试wcf时出错

After viewing the service in browser i got the page without error (您已经创建了一个服务。)没有任何错误。但如果我调试模式,我会得到以下错误。

displayed this page if debugging to run in test client window

我真的不明白问题出在哪里是来自,但即时通讯的思想从我的配置细来,但我只是不能得到哪里。

这里是我的web.config文件。

<system.serviceModel> 
    <services> 
     <service behaviorConfiguration="namespaceName.Service1Behavior" name="namespaceName.Service"> 
      <endpoint address="http://localhost:6937/Service.svc" binding="basicHttpBinding" contract="namespaceName.IService"> 
       <identity> 
        <dns value="localhost" /> 
       </identity> 
      </endpoint> 
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
      <behavior name="namespaceName.Service1Behavior"> 
       <!-- To avoid disclosing metadata information, set the value below to false 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="false" /> 
      </behavior> 
     </serviceBehaviors> 
    </behaviors> 
</system.serviceModel> 

回答

1

我认为你有这个在您的配置文件:

<system.web> 
    <compilation debug="true" /> 
<system.web> 
+1

感谢@krystan我没有包括。但现在我的工作已经添加了。再次感谢。 – 2014-10-28 11:09:43