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

前端 未结 4 1779
借酒劲吻你
借酒劲吻你 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:20

    Yes the issue is with publishing metadata. Just adding one more tips. You can also add service meta data using code, like this :

    ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
    smb.HttpGetEnabled = true;
    
    host.Description.Behaviors.Add(smb);
    

    More details here : http://msdn.microsoft.com/en-us/library/aa738489%28v=vs.110%29.aspx

提交回复
热议问题