the content type 'application/json; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'

前端 未结 2 774
面向向阳花
面向向阳花 2020-12-17 01:50

When using firebug, I got this wired error \"NetworkError: 415 Cannot process the ...xt/xml; charset=utf-8\'. - http://localhost:59899/wsccc1/wscccService.svc/RunTts

2条回答
  •  渐次进展
    2020-12-17 02:20

    You need to use the WebServiceHostFactory, instead of the regular ServiceHostFactory in your code. That will configure the endpoint with the appropriate binding (webHttpBinding) and behavior (webHttp) to honor the [WebInvoke] attribute.

    
       
         
      
    
    

提交回复
热议问题