emilio 10 Junior Poster

hi
i'm trying to write something i have done many time but still i encounter with a problem.
i'm writing a web service that is protected with network credentials.
in my web service application i added the following config:

<authorization>	    
   <deny users="?" />
   <allow users="computername\username" />
   <deny users="*" />
</authorization>

the client side call to the service looks as following:

MyService.MyService proxy = new MyService.MyService();
ICredentials creds = new NetworkCredential(@"computername\username", "password");

string s = proxy.HelloWorld();

i fail with as 401 un authorized exception. i tried every single config combination i could think of, using roles, denying users, nothing works.
the only two results i get is: 1) none of the users are allowed. 2) any user with any credentials are allowed.

the web service is hosted on windows server 2008 and the client is on windows 7.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.