Problem accessing webservices

K

Kerry Matt

Hi All,
We have problems in accessing a WebService which is
running on a remote server from a ASPX application. It
gives us Un Authorized Exception. The Webservice is
using "Basing Authentication". Any idea of how to get it
work?.

Thanks in Advance.

Kerry Matt
 
J

Jan Tielens

Probably you didn't set the PreAuthenticate property to true, and passed the
current credentials:

Dim eng As New myWebservice.Service
eng.PreAuthenticate = True
eng.Credentials = System.Net.CredentialCache.DefaultCredentials
'This will pass the credentials of the currently logged on user
eng.DoSomething

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
K

Kerry Matt

Thanks for your reply,
I need some clarifications, by
setting the Preauthenticate property are we sending the
credentials of the Web Service or the credentials of the
ASPX application. Since we run the ASPX application and
the Web Service on different systems i am having this
confusion.

Thanks in Advance,

KerryMatt
 
J

Jan Tielens

You are sending the credentials of the user that is using your
website/application if you have checked Integrated Windows Security in IIS
management. Otherwise you're sending the credentials of the account your
asp.net site is running under.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
K

Kerry Matt

Thanks for your reply,

I am using Basic Authentication in IIS. Should i send
the credentials for the Remote WebServer or the
credentials of my local ASPX application.

Thanks in Advance
Kerry Matt
 
K

Kerry Matt

Does it means i have to hard code the User Name and
Password for the Remote Server.

Thanks in Advance

Kerry Matt.
 
K

Kerry Matt

Hi Jan,
Thanks very much for the clarification. It was a timely
help which means lot to us.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top