1
바인딩 사이에 불일치가 있기 때문에메시지 토큰이 잘못되었거나 만료 된 보안 컨텍스트를 포함하거나 내가 Web.config를 사용하여 WCF 서비스를 소비하는 샘플 웹 응용 프로그램이
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="TheBindingConfig">
<security mode="None" >
<transport clientCredentialType="None" />
<message establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/myservice/Service.svc"
binding="wsHttpBinding" bindingConfiguration="TheBindingConfig"
contract="myservice.IService" name="WSHttpBinding_IService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
및 WCF 서비스 구성 파일이 참고 서비스는 네임 스페이스로 작성되어
<system.serviceModel>
<services>
<service name="myservice.Service" behaviorConfiguration="ServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="myservice.IService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
다음과 같이 "
MYSERVICE"
내가
The message could not be processed. This is most likely because the action 'http://tempuri.org/IService/GetUserDetails' 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.
같은 오류 응답 및 스택 추적을 오전
[FaultException: The message could not be processed. This is most likely because the action 'http://tempuri.org/IService/GetUserDetails' 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.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9439503
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345
sampleuserservice.IService.GetUserDetails(String Username) +0
sampleuserservice._Default.BindUserDetails() +57
sampleuserservice._Default.Page_Load(Object sender, EventArgs e) +90
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
참고로 : 서비스가 제대로 위의 webconfig 파일
사이의 매핑 문제가있는 것 같아요 을 예상대로 실행귀하의 소중한 응답과 성원을 기다리십시오.
WCFTestClient 또는 SoapUI에서 서비스를 호출 할 때 서비스가 작동합니까? – MaxSC
Visual Studio의 @ MaxS-Betclic WCF 테스트 클라이언트 – GowthamanSS
@ MaxS-Betclic이 네임 스페이스가 작동 중임 – GowthamanSS