Thanks Chris,
I am setting the credentials before calling the web method. And, inside the
web method I have checked that it is set properly.
The problem is that Web Service needs to accesss a file on client machine.
And when it does, it does not impersonate the user. However, it does
impersonate when accessing resources on the Web Server because I am able to
connect and query the SQL Server that is running on the Web Server.
While in Web Method, can we somehow change the credentials? Will that work
in this situation? I mean accessing ressources on client/othermachine?
Khalique
> By default IE passes the credentials with the request, which is not the
> default in the client app, so IE works and the app does not. You must set
[quoted text clipped - 41 lines]
> > (By the way I have tested the web service by logging on to web server and
> > using IE to call the web service. That works perfectly fine)
Chris Botha - 02 Feb 2005 20:12 GMT
Sorry, I misunderstood. The issue here is called the "double hop" issue.
Try hard coding the user name and password in the web.config file on the
"impersonate" line to represent a network user that has access to the 3rd
computer. The disadvantages are the web app will always run in the context
of this user, and the password is visible in the web.config file, but
someone must have access to the machine to read the password, so maybe it is
not such a big deal.
Read more about "double hop" here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/trouble
shooting_authentication_problems_on_asp_pages.asp
Also search it in google, there are other solutions, Kerberos, etc, but not
for the faint of heart.
> Thanks Chris,
> I am setting the credentials before calling the web method. And, inside
[quoted text clipped - 65 lines]
>> > and
>> > using IE to call the web service. That works perfectly fine)
Khalique - 07 Feb 2005 14:59 GMT
Thanks Chris forthe help and the reference. I am looking into the possibility
of using kerberos.
Khalique
> Sorry, I misunderstood. The issue here is called the "double hop" issue.
> Try hard coding the user name and password in the web.config file on the
[quoted text clipped - 77 lines]
> >> > and
> >> > using IE to call the web service. That works perfectly fine)