WCF报System.ServiceModel.Diagnostics.TraceUtility异常
<?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>
[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) { //业务逻辑代码 } }