开发者

WCF WebInvoke, Asp.net script using OPTIONS instead of POST Method

We have a WCF service in our web application which is being called by browser through ajax(jquery and asp.net scriptmanager)

In this service some of the methods are WebGet and some of them are WebInvoke

Problem is now any request to WebInvoke method through asp.net scriptmanager is making request using http 'OPTIONS' instead of 'POST'. And webserver is going to deny this request as it don't allow OPTIONS

POST should be default for WebInvoke attribute when no method is defined.

We started having this problem since last couple of weeks just spotted today. We upgraded everything to .net 4.0 around same time so not sure .net 4.0 has something changed.

Also weird thing is everything works fine when using website like xyz.com we only see problem when using www.xyz.com

Any idea what it could be?

Edit: Ok got little closure

Problem is Asp.n开发者_运维问答et scriptmanager does not allow cross site reference in ajax. But wait we do not do anything that calls cross site.

What i found is when i use www.a.com some how js files generated by script manager wants to use a.com not www.a.com.

Any idea how to resolve this?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜