IIS Server Security - Basic Authentication problem Winapp to web service

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server Security > June 2006 > Basic Authentication problem Winapp to web service





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Basic Authentication problem Winapp to web service
bilosta@gmail.com

2006-06-13, 1:23 pm

In web service config file:
<allow user = "oga">
<allow user = "dragan">
<deny users="?"/>
<deny users="*"/>

Now, when I open internet explorer and put the adrees
(http://server/muService/Service.asmx)
it promped me a window for credentials. So when I wrote user/pass
-oga(username)
-ok(pass)
I can see the methods in web service, and i can "try" them



in my Win Apllication i've instanced my web service and set the
credentials:

//constructor
public Obrada()
{
this.myService = new Diplomski.Servis.Service();
CredentialCache c = new CredentialCache();
NetworkCredential cr = new
NetworkCredential(textBoxUser.Text,textBoxPass.Text,"domen");
c.Add(new Uri(myService.Url), "Basic", cr);
myService.Credentials = c;
}


but when I put the same user and password (oga(username), ok(pass)),
and when i call some method from web service, :
public bool IsPass(some arg)
{
if (myService.Method(arg))//401ERROR
}


i get 401 ERROR

Can enyone tell me where is the issue?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com