views:

1389

answers:

3

Hey everyone,

I am making a POST to a webservice that is local to the webserver. Everything works great until I host the site at my SSL enabled webserver. The webservice path is relative, meaning, I am making no reference to the protocol. eg. /webservices/method.asmx

The POST results in a runtime error. Has anyone seen this before?

$.ajax({
type: "POST",
url: theURL+"/"+method,
data: body,
success: function(msg) {
alert("Data Saved: " + msg);

},
    error:function(msg){
    alert("Broken: " + theURL + "/" + method + msg.responseText);
    }
});
A: 

What happens if you specify an absolute url, including the protocol https:// piece... I usually put a javascript variable in my masterpages/template for "baseURL" for the prot://host:port/apppath/ reference... where port is only included if not the default. Haven't, iirc, seen such an issue.

Tracker1
A: 

Can you give the full error and the FireBug data?

Chris Brandsma
A: 

Because this project is done in .NET 2.0.. the web method seems to handle the input data differantly. I was able to get around this by just construction a query sting and passing it rather than a JSON object.

Nick