首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web Service >

WCF报System.ServiceModel.Diagnostics.TraceUtility错误

2012-09-14 
WCF报System.ServiceModel.Diagnostics.TraceUtility异常XML code?xml version1.0 encodingutf-8 ?

WCF报System.ServiceModel.Diagnostics.TraceUtility异常

XML 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>

C# 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初学者,请高手指教
或者有没有人能给个web和winform都能调用的wcf配置文件
谢谢

[解决办法]
探讨

进来散分了,后天结贴

[解决办法]
帮顶!!!
WCF我也是菜鸟!

热点排行