c# - Wcf service exception "The HTTP request is unauthorized with client authentication scheme" -


i getting exception @ client side while processing out side vendor wcf service "the http request unauthorized client authentication scheme 'basic'. authentication header received server 'basic realm="casm"'". requesting large datas webservice point of time getting exception.intersting thing getting data wcf service , after getting exception.so assume whether need fine tune request?? should not ask large data @ time or thing different issue. did post shown "error when adding web service reference in vs2012" no luck. can tell me possible reason behind exception. below webconfig part , suing username , password in code

<binding name="test" closetimeout="00:01:00" opentimeout="00:01:00"       receivetimeout="00:10:00" sendtimeout="00:01:00" allowcookies="false"       bypassproxyonlocal="false" hostnamecomparisonmode="strongwildcard"       maxbuffersize="6553600" maxbufferpoolsize="524288" maxreceivedmessagesize="6553600"       messageencoding="text" textencoding="utf-8" transfermode="buffered"       usedefaultwebproxy="true">       <readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384"         maxbytesperread="4096" maxnametablecharcount="16384" />       <security mode="transportcredentialonly">         <transport clientcredentialtype="basic" proxycredentialtype="basic"           realm="" />         <message clientcredentialtype="username" algorithmsuite="default" />       </security>     </binding>   <endpoint address="http://testurl/as" binding="basichttpbinding"     bindingconfiguration="test" contract="testservice.test" name="test">   </endpoint> 

update

one more thing realm="casm" in exception , not able set in client config, intellisense not giving

try change

 <security mode="transportcredentialonly">     <transport clientcredentialtype="basic" proxycredentialtype="basic"       realm="" />     <message clientcredentialtype="username" algorithmsuite="default" />   </security> 

with line

<security mode="transportcredentialonly">    <transport clientcredentialtype="anonymous"/>    <message clientcredentialtype="username" algorithmsuite="default"/> </security> 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -