WCF hosting: Can access svc file but cannot go to wsdl link

前端 未结 4 1783
借酒劲吻你
借酒劲吻你 2021-02-12 12:31

I have a WCF service that is hosted in IIS 7.5. I have two servers, one for test and one for production.

The service works fine on test server, but on the production ser

4条回答
  •  孤城傲影
    2021-02-12 13:14

    I know that answer it's so late but I had the same problem and the solution was:

    Add tags [ServiceContract] and [OperationContract] on interface that it is implemented on service .svc. Visual Studio create interface when you select WCF Service but I deleted the interface and I created my own interface.

    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        void DoWork();
    }
    

    I hope to help somebody.

提交回复
热议问题