- 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我也是菜鸟!