首页 新闻 搜索 专区 学院

WCF报System.ServiceModel.Diagnostics.TraceUtility异常

0
悬赏园豆:60 [已解决问题] 解决于 2012-07-05 14:13
View Code
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <standardEndpoints>
      <webHttpEndpoint>
        <standardEndpoint crossDomainScriptAccessEnabled="true"/>
      </webHttpEndpoint>
    </standardEndpoints>
    <bindings>
      <webHttpBinding>
        <binding crossDomainScriptAccessEnabled="true" />
      </webHttpBinding>
    </bindings>
    <services>
      <service name="HHSoft.FieldProtect.WCF.SOASerivces.WfControlServices">
        <endpoint kind="webHttpEndpoint"
                  address="http://ip:端口/WfControlServicesRest"
                  contract="HHSoft.FieldProtect.WCF.SOAContracts.IWfControl"/>
      </service>
    </services>
    
    <behaviors>
      <serviceBehaviors>
        <behavior name="SOABehavior">
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="endPointBehavior"></behavior>
      </endpointBehaviors>
    </behaviors>
    <services>
      <service name="HHSoft.FieldProtect.WCF.SOASerivces.WfControlServices" behaviorConfiguration="SOABehavior">
        <endpoint address="http://ip:端口/WfControlServicesSoap" binding="wsHttpBinding" 
                  contract="HHSoft.FieldProtect.WCF.SOAContracts.IWfControl" 
                  behaviorConfiguration="endPointBehavior"></endpoint>
      </service>
    </services>
  </system.serviceModel>
  <appSettings>
    <add key="Code" value="2100000"/>
  </appSettings>
</configuration>
View Code
[ServiceContract] 
public interface IWfControl
{
  [OperationContract]
  [WebGet(UriTemplate = "Put/{itemcode}/{wfState}/{des}")]
  bool WfControl(string itemCode, string wfState, string des);
}
public class WfControlServices : IWfControl
{
  public bool WfControl(string itemCode, string wfState, string des)
  {
    //业务逻辑代码
  }
}

应该是WCF服务的节点配置问题
因为用application单独调用http://ip:端口/WfControlServicesSoap运行没有问题;
单独使用http://ip:端口/WfControlServicesRest/put/2103212012004/1/saf运行也没有问题
但是当两个配置一起用报这个错误;
WCF初学者,请高手指教

wcf
问题补充:

或者有没有人能给个web和winform都能调用的wcf配置文件
谢谢

这是堆栈异常信息

   在 System.ServiceModel.Diagnostics.TraceUtility.SetEtwProviderId()
   在 System.ServiceModel.ServiceHostBase..ctor()
   在 System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
   在 SOAHost.Program.SOAServiceStart()
   在 SOAHost.Program.Main(String[] args)
IT-Chris的主页 IT-Chris | 初学一级 | 园豆:148
提问于:2012-05-15 09:56
< >
分享
最佳答案
0
收获园豆:60
悟行 | 专家六级 |园豆:12429 | 2012-05-15 10:22
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册