首页 新闻 会员 周边

我的wcf服务在本机运行正常,但在其他机子上运行报由于内部错误,服务器无法处理该请求。

0
悬赏园豆:20 [已解决问题] 解决于 2014-03-27 12:42
报的错误是:

客户端配置内容为

<system.serviceModel>
        <bindings>
            <wsHttpBinding>                        
                <binding name="WSHttpBinding_DepartmentService">
                    <security mode="None" />
                </binding>
                <binding name="WSHttpBinding_EvaluationService">
                    <security mode="None" />
                </binding>
                <binding name="WSHttpBinding_MedicalStaffService">
                    <security mode="None" />
                </binding>
                <binding name="WSHttpBinding_UserInfoService">
                    <security mode="None" />
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://127.0.0.1:9999/DepartmentService"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_DepartmentService"
                contract="DepartmentService.DepartmentService" name="WSHttpBinding_DepartmentService" />
            <endpoint address="http://127.0.0.1:9999/EvaluationService"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_EvaluationService"
                contract="EvaluationService.EvaluationService" name="WSHttpBinding_EvaluationService" />
            <endpoint address="http://127.0.0.1:9999/MedicalStaffService"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_MedicalStaffService"
                contract="MedicalStaffService.MedicalStaffService" name="WSHttpBinding_MedicalStaffService" />
            <endpoint address="http://127.0.0.1:9999/UserInfoService"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_UserInfoService"
                contract="UserInfoService.UserInfoService" name="WSHttpBinding_UserInfoService" />
        </client>
    </system.serviceModel>
wcf
问题补充:

服务端配置的内容为

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="departmentDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://127.0.0.1:9999/DepartmentService/metadata" />
        </behavior>
        <behavior name="evaluationDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://127.0.0.1:9999/EvaluationService/metadata" />
        </behavior>
        <behavior name="medicalStaffDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://127.0.0.1:9999/MedicalStaffService/metadata" />
        </behavior>
        <behavior name="userInfoDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://127.0.0.1:9999/UserInfoService/metadata" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="departmentDataBehavior" name="AppraiseTest.Services.DepartmentService">
        <endpoint address="http://127.0.0.1:9999/DepartmentService" binding="wsHttpBinding"
            bindingConfiguration="NoneSecurity" contract="AppraiseTest.Contracts.IDepartment"/>
      </service>
      <service behaviorConfiguration="evaluationDataBehavior" name="AppraiseTest.Services.EvaluationService">
        <endpoint address="http://127.0.0.1:9999/EvaluationService" binding="wsHttpBinding"
            bindingConfiguration="NoneSecurity" contract="AppraiseTest.Contracts.IEvaluationInfo"/>
      </service>
      <service behaviorConfiguration="medicalStaffDataBehavior" name="AppraiseTest.Services.MedicalStaffService">
        <endpoint address="http://127.0.0.1:9999/MedicalStaffService" binding="wsHttpBinding"
            bindingConfiguration="NoneSecurity" contract="AppraiseTest.Contracts.IMedicalStaff"/>
      </service>
      <service behaviorConfiguration="userInfoDataBehavior" name="AppraiseTest.Services.UserInfoService">
        <endpoint address="http://127.0.0.1:9999/UserInfoService" binding="wsHttpBinding"
            bindingConfiguration="NoneSecurity" contract="AppraiseTest.Contracts.IUserInfo"/>
      </service>
    </services>
    
    <bindings>
      <wsHttpBinding>
        <binding name="NoneSecurity"
          maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" useDefaultWebProxy="false">
          <readerQuotas maxStringContentLength="12000000" maxArrayLength="12000000"/>
          <security mode="None"/>
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>
sysmenu的主页 sysmenu | 初学一级 | 园豆:71
提问于:2014-03-23 23:08
< >
分享
最佳答案
0

<serviceDebug includeExceptionDetailInFaults="true"/>通过在服务配置文件里添加这句话调试出详细问题,为数据库连接异常

sysmenu | 初学一级 |园豆:71 | 2014-03-27 12:40
其他回答(1)
0

按照错误提示,把 debug 打开,看下具体的错误信息。

收获园豆:20
Launcher | 园豆:45045 (高人七级) | 2014-03-24 09:16

具体错误咋看?不好意思

支持(0) 反对(0) sysmenu | 园豆:71 (初学一级) | 2014-03-24 21:42

@sysmenu: 具体错误不会看没关系,但是你必须要具有基础的阅读理解能力。你看你最先贴的那个图,FaultException 下面有一段文字描述,你照着那个做。

支持(0) 反对(0) Launcher | 园豆:45045 (高人七级) | 2014-03-25 09:11

@Launcher: 谢谢你细心的教导,我在服务配置文件里添加了一个

<serviceDebug includeExceptionDetailInFaults="true"/>

再次调试错误的时候就说的比较准确了,其实是数据库连接出了问题。

支持(0) 反对(0) sysmenu | 园豆:71 (初学一级) | 2014-03-25 09:47
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册