Basic Authentication problem Winapp to web service
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS Server Security > Basic Authentication problem Winapp to web service




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06: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?






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:16 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register