WCF UriTemplate通配符不起作用

时间:2018-06-12 13:08:21

标签: wcf cors options uritemplate

我有一些类似的方法:

mailingAddressCheckbox

和一个处理由于CORS而由浏览器发送的OPTIONS-verb的方法:

[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "Login")]
ResponseLogin Login(string user, string password);

浏览器想要发出POST请求时的预检请求是

[OperationContract]
    [WebInvoke(Method = "OPTIONS", UriTemplate = "*")]
    void HandleHttpOptionsRequest();

我想独立于uri处理所有OPTIONS方法。那是我试过UriTemplate =" *"但它不起作用。

错误:

OPTIONS http://foo:0451/bar/Login

你有什么想法吗?

0 个答案:

没有答案