I am trying to access my WCF service on a server from my client console application for testing. I am getting the following error:
The caller was not authenticated by the service
I am using wsHttpBinding
. I'm not sure what kind of authentication the service is expecting?
<behaviors>
<serviceBehaviors>
<behavior name="MyTrakerService.MyTrakerServiceBehavior">
<!-- 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>
Update
It works if I change my binding to <endpoint "basicHttpBinding" ... />
(from wsHttpBinding)
on the IIS 7.0 hosted, windows 2008 server
I was able to resolve the shared issue by following below steps:
set anonymous access in your virtual directory
write following credentials to your service
after that you call your webservice methods.
I also had the same problem in
wsHtppBinding
. And I just had to addsecurity
mode pointing tonone
, that solved my problem and no need to switch tobasicHttpBinding
. Check Here and check how to disable WCF security. Check the below config change for reference:Why can't you just remove the security setting altogether for wsHttpBinding ("none" instead of "message" or "transport")?
Have you tried using basicHttpBinding instead of wsHttpBinding? If do not need any authentication and the Ws-* implementations are not required, you'd probably be better off with plain old basicHttpBinding. WsHttpBinding implements WS-Security for message security and authentication.