Secure a .Net WCF Web Service for single windows user

JElster
JElster used Ask the Experts™
on
Hi.
I have a basic web service. I only want a single windows user named 'WebUser' to have access to the service. How do I do this. I have windows auth on in IIS and anon off.
What do I need to do in the web.config and IIS.
thx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
add this

<configuration>
  <system.web>
    <authorization>
      <allow users="DOMAINNAME\Webuser"/> OR
      <allow users=".\Webuser"/> IF IT IS A LOCAL WINDOWS USER
      <deny users="*"/>
    </authorization>
  </system.web>
</configuration>

Author

Commented:
This is what I get
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'."}

Any ideas... If I access the service via the browser and enter the windows credentials it works.
In my code I'm adding

client.ClientCredentials.username.username =  
etc

thx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial