Click here to Skip to main content
15,887,895 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi my scenario is as follows

I have an asp web page
I need to access a web service to download information but to do so I need to use the remote users network credentials (ie they are on a different machine).

My problem is essentially how do I get those credentials?

On the same machine hosting the site I can user identity emulation in combination with windows authentication and the site works fine, I can access the web service. As soon as I try to do this from another machine accessing the website it stops working.

I have debugged it and neither of the possible credentials on the credential cache have any information related to the remote user so accessing the web service fails (these being assigned as its credentials). If I populate a new networkcredential class with the username, domain and password then set it as the service credentials it works fine. But what is the best way to go about this.

I can think of no other way to get the domain, username and password other than by having the user enter it in the login, I then save them to the session state and use them whenever I need to call the service. This does not seem very elegant to me and I am concerned about storing these in the session state. What would be the best way to do this? Is there a way for me to get the credentials of the remote user?

Thanks in advance
Posted
Comments
hitesh_tech 7-Oct-13 12:15pm    
Can you set webservice hosting to run under one common windows account ?
Merklynn 7-Oct-13 15:53pm    
I don't have the ability to change the settings of the web service. I am trying to access it from a different server in the code for an asp web application. It works fine if I log in to windows on that server, but if I use the website on a remote machine it stops working. Had a bit of a look on-line and believe this is a problem known as the double hop issue. Cant seem to find a good solution to it though. Can anyone help?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900