c# - Reproduce Issue: The http request was forbidden with client authentication scheme 'anonymous' -
i re-produce wcf issue : the http request forbidden client authentication scheme 'anonymous'
we using wcf service in our product , have hosted wcf service windows service (self-host service) , wcf service being consumed small windows client app.
things working fine in our environment. but, 1 of our customer reported receiving error "the http request forbidden client authentication scheme 'anonymous'" while connect client app remote client machine.
here, question is, can me re-generate issue in our environment, can give perfect fix.
serviceapp.config
<bindings> <wshttpbinding> <binding name="mybinding" maxbufferpoolsize="2147483647" maxreceivedmessagesize="2147483647"> <readerquotas maxdepth="100" maxstringcontentlength="2147483647" maxarraylength="2147483647" maxbytesperread="2147483647" /> <reliablesession inactivitytimeout="24.00:00:00" /> <security mode="none"> <message clientcredentialtype="none" /> </security> </binding> </wshttpbinding> </bindings> <services> <service behaviorconfiguration="mybehaviour" name="wcfserver.calculatorservice"> <endpoint address="http://localhost:7000/test" behaviorconfiguration="myendpointbehavior" binding="wshttpbinding" bindingconfiguration="mybinding" name="endpt_service" contract="wcfserver.icalculator"/> </service> </services>
clientapp.config
<bindings> <wshttpbinding> <binding name="calbinding" maxbufferpoolsize="2147483647" maxreceivedmessagesize="2147483647"> <readerquotas maxdepth="100" maxstringcontentlength="2147483647" maxarraylength="2147483647" maxbytesperread="2147483647" /> <reliablesession inactivitytimeout="24.00:00:00" /> <security mode="none"> <message clientcredentialtype="none" /> </security> </binding> </wshttpbinding> </bindings> <client> <endpoint address="http://remoteservername:7000/test" behaviorconfiguration="calendpointbehavior" binding="wshttpbinding" contract="wcfserver.icalculator" name="endpt_calc" bindingconfiguration="calbinding"/> </client>
i found in msdn forum, hope helps you:
since have specified security mode= none wshttpbinding, when make request wcf service , service try authenticate client using aninymous credentials, in case of different domains not work, try use x509 certitifates.
so try establish connection between 2 different domains.
Comments
Post a Comment