Basic Authentication problem Winapp to web service
am 13.06.2006 17:44:30 von bilostaIn web service config file:
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?