views:

79

answers:

2

I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).

So, how do I setup my WCF service to accept calls from an SSL-secured page? Does the WCF service also need to be secured? If so, how do I do this?

Thanks,

Joe

+2  A: 

If the problem is SOP, could you host the JSON services on the same server as the ASPX pages?

It may be that it is a browser setting which blocks a combination of SSL and non-SSL content.

Shiraz Bhaiji
A: 

you have to make sure that the browser has a valid certificate for the web service end point.

what happens when you fire up a javascript editor within your browser, and make a call to the web service? do you get any specific errors back?

in firefox, install "firebug" if you haven't already. look at your ajax calls and see what headers are returned from the server. specifically the status code. than you can be sure which part of your call is failing and with what error

Sonic Soul