JQuery에서 교차 도메인 WCF 4.0 REST 서비스로 JSON 데이터를 게시하려고하는데 교차 도메인 측면을 지나칠 수 없습니다.WCF 4.0 REST 서비스에 대한 jQuery 도메인 간 게시
[OperationContract]
[WebInvoke(Method = "*",
BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Json
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "Save")]
DataContract Save(DataContract dataContract);
가 여기 내 jQuery 코드입니다 :
$.ajax(
{
type: 'POST',
url: url,
data: JSON.stringify(data),
dataType: 'json',
contentType: 'application/json',
success: function(data)
{
alert('success');
},
error:function (xhr, ajaxOptions, thrownError)
{
alert(xhr.status);
alert(thrownError);
} });
내가 this post 우연히 발견했지만 작동 가져올 수 없습니다 여기 내 REST 방식입니다. 도와주세요.
감사
톰은 IIS 7에서, 가치가 무엇인지에 대한