我有服务
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public Customer GetCustomer(string customerNumber)
{
return _service.GetCustomer(customerNumber);
}
我用j Query从网页上打电话
var customerNumber = 123456 ;
$.getJSON( /JsonServices/B2BServiceJson.svc/GetCustomer , { customerNumber: customerNumber }, customerSelected);
下面是呼唤正义者的呼声:
// HELP! result is null when SSL is enabled
function customerSelected(result) {
var customer = result.GetCustomerResult;
var email = customer.Email;
// other stuff
}
这里是组合。
<system.serviceModel>
<services>
<service name="B2B.JsonServices.B2BServiceJson">
<endpoint address="" binding="webHttpBinding" contract="B2B.JsonServices.B2BServiceJson"
behaviorConfiguration="ajaxBehavior" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="ajaxBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<!-- other stuff -->
This worked fine until I enabled SSL on my servers. Now the getJSON call succeeds but returns null. Please help me get this working over SSL. Thanks
我的环境是:Net 3.5, IIS 7