편안하고 나는이 같은 게시물 내 방법을 만들어 :WCF 서비스는
[OperationContract]
[WebInvoke(Method = "POST",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare)]
List<Human> GetHuman(UserEnteredName humanName);
UserEnteredName 클래스는 단지 하나의 속성이 있습니다 - 문자열입니다.
그리고 작동합니다. 그러나, 나는 그것을 게시 해야지 얻지 않아야합니다.
[WebInvoke(Method= "GET", UriTemplate = "GetHuman?username={John}",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json)]
을하지만 그것은 작동하지 않습니다
나는이 함께했습니다. 무엇을 바꾸어야합니까?
오류 게시 ... "작동하지 않음"이란 무엇입니까? – andreapier
@andreapier 오류는 500 내부 서버 오류입니다. –
아마 기본 도메인이 아닌 도메인에서 일부 json을 얻으려고합니까? 즉, 기본 도메인이 www.mydomain.com이고 inner.mydomain.com에서 ajax 호출을하고 있습니까? – andreapier