WCF Metadata publishing for this service is currently disabled + Content Type error

后端 未结 6 914
再見小時候
再見小時候 2020-12-08 07:32

That Metadata error is what I get when I browse to the service in a browser. I am not consuming it with a client

and Yes.. I added

6条回答
  •  执念已碎
    2020-12-08 08:15

    I had a similar issue. For anyone that might come across this later. My problem was that my service interface did not have the [ServiceContract] DataAnnotation

    [ServiceContract] //<--This was missing
    public interface IServiceInterface
    {
        [OperationContract]
        void Foo(Bar bar)
        //...
    }
    

提交回复
热议问题