Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.`

后端 未结 16 2144
清歌不尽
清歌不尽 2020-12-04 15:42

EDIT:

After I modified the web.config and I don\'t get error that\'s good.... then I add a new page (html) and write this small code to consume the serv

16条回答
  •  自闭症患者
    2020-12-04 16:02

    I observed that when I removed SessionMode from the ServiceContract attribute, the issue went away.

    Example:

    [ServiceContract(SessionMode=SessionMode.Required, CallbackContract=typeof(ICallbacks))]
     public interface IStringReverser
     {
       [OperationContract]
       string ReverseString(string value);
     }
    

    to...

    [ServiceContract()]
     public interface IStringReverser
     {
       [OperationContract]
       string ReverseString(string value);
     }
    

提交回复
热议问题