CRM 웹 서비스를 실행하려고 다음과 같은 오류를 얻기 \잘못된 요청 (415)
코드
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = 0; //Use AD authentication
token.OrganizationName = "Organization";
CrmService service= new CrmService();
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.PreAuthenticate=true;
WhoAmIRequest whoami = new WhoAmIRequest();
WhoAmIResponse whoResp = ((WhoAmIResponse)(service.Execute(whoami)));
구성 설정 :.
<add key="CrmSdk.CrmServiceWsdl" value="http://server/organization/XRMServices/2011/Organization.svc/web"/>
오류 :
System.Net.WebException : HTTP 상태 415로 요청이 실패했습니다. 콘텐츠 형식 'text/xml; charset = utf-8 '이 예상 유형이 아니 었습니다'application/soap + xml; charset = utf-8 '..
아래 설정 값을 변경하면 "잘못된 요청"이 표시됩니다.
구성 설정 :
<add key="CrmSdk.CrmServiceWsdl" value="http://server/organization/XRMServices/2011/Organization.svc/web"/>
오류 :
The message with Action 'http://schemas.microsoft.com/crm/2007/WebServices/Execute' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).