开发者

Why .NET ASMX web service on secure.site.com can't be called from www.site.com?

开发者 https://www.devze.com 2022-12-30 05:15 出处:网络
We have a web service on https://secure.site.com/service.asmx it works fine from https://secure.开发者_JAVA百科site.com/consumer.html

We have a web service on https://secure.site.com/service.asmx it works fine from https://secure.开发者_JAVA百科site.com/consumer.html

but when we try to use it from https://www.site.com/consumer.html we can't do it. Getting 403 error.

I'ts probably something related to webservice security (because of different subdomains) but I can't figure out what. How to make https://secure.site.com/service.asmx be accessible from https://www.site.com/consumer.html?

Update: Calling webserivce using JQuery Ajax.

  $.ajax({
        type: "POST",
        url: "https://secure.site.com/service.asmx/method",
        data: {},
        dataType: "xml",
        success: method_result,
        error: AjaxFailed
    })

;

Thanks.


I recall working on something like this. I just made a demo app and recall having to add something like the following in one of the htlm pages within a javascript block:

document.domain: "*.site.com"; or "site.com";

details are fuzzy and it maybe for another issues I had, but its something to go on.

0

精彩评论

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