2012-11-06 2 views
3

이 codeproject sample을 따랐습니다. JQuery와 섹션에있는 wsHttpBinding에 노출 된 서비스를 소비 에서
는이 쓰여 그 :
JQuery 끝에서 WS-Security를 ​​구현하려면 어떻게해야합니까?

A service exposed with “wsHttpBinding” binding implements WS-Security of WS-* family of web service specifications. As the binding uses security, the request will be rejected. The service cannot be called without implementing WS-Security at JQuery end. So, in order to call the service method, we have to compromise with the security.

그들이 안전하지 않은 <wsHttpBinding> 엔드 포인트를 구현하고 있습니다.

는하지만 내가 원하는 내 <wsHttpBinding> 될 것 <security mode="Message">,
이 오프 과정이 아닌 작품과 다음과 같은 오류를 반환하지 : 나는 <security mode="None">로 변경됩니다

The message could not be processed. This is most likely because the action 'http://www.enghouse.com/CosmoCom/WebAdminAPIServiceLibrary/IQueue/GetAllQueues' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

그것을 완벽하게 작동합니다.

제 질문은 어떻게 <security mode="Message">을 구현할 수 있습니까?
내가해야 할 일은 무엇입니까?

감사합니다.

답변

2

Check out Ws.js. ws-security를 ​​구현하는 데 도움이되는 JavaScript 라이브러리입니다.

개인적으로 웹 클라이언트를 소스 코드가없는 기존 WCF 서비스와 통합해야하는 경우에만이 작업을 수행합니다. 오버 헤드가 너무 커서 추가 이점없이 웹 클라이언트에 대한 SOAP 프로토콜 및 WCF 보안을 유지할 수 없습니다. 이 서비스의 소스를 제어하는 ​​경우 ASP.NET Web API을 사용하여 웹 클라이언트에 대한 REST API를 제공하고 HTTP 기본 보안과 함께 SSL을 사용합니다.