给定合同如:
[ServiceContract] public interface IService
{
[OperationContract]
[WebGet(UriTemplate = "GetData/{id}.{format}")]
ResponseData GetData(string id, string format);
}
Run Code Online (Sandbox Code Playgroud)
有没有办法让服务在请求时以json响应:/GetData/1234.json,xml当被请求为/GetData/1234.xml时仍然可以作为一个其他网址的正确肥皂服务,强烈键入wsdl合同?
使用Stream作为GetData的返回值是不可行的,就好像它满足前两个要求一样,wcf无法创建完整的wsdl规范,因为它不知道结果Stream的内容是什么.
例如,我们想从Global.asax错误处理程序中捕获用于erorr报告电子邮件的YSOD输出.有没有办法利用内置的ysod生成器?
asp.net error-logging yellow-screen-of-death error-reporting