Impersonate using credentials of currently logged on user.
-
Hi, I am having one problem. I have one web application calling web service, say webservice1. Webservice1 calls webservice2 which reads a file from the network and sends back the response. The problem is web application, webservice1 and webservice2 are all running under network service account. Network service account does not access to network resources. Hence, in the webservice2 I have to find the currently logged on user and impersonate it. After that the code will work fine. The problem is, how to get the currently logged user and impersonate it when I am not having his password. :^) Regards, Jayant
-
Hi, I am having one problem. I have one web application calling web service, say webservice1. Webservice1 calls webservice2 which reads a file from the network and sends back the response. The problem is web application, webservice1 and webservice2 are all running under network service account. Network service account does not access to network resources. Hence, in the webservice2 I have to find the currently logged on user and impersonate it. After that the code will work fine. The problem is, how to get the currently logged user and impersonate it when I am not having his password. :^) Regards, Jayant
In IIS 6.0 you can always assign the web service you want to give more access rights to, a custom application pool with the account set to "SYSTEM" or even to log on as a user on the server you can set up with just the permissions your web service needs.
-
In IIS 6.0 you can always assign the web service you want to give more access rights to, a custom application pool with the account set to "SYSTEM" or even to log on as a user on the server you can set up with just the permissions your web service needs.
Yes, you are right. But that will make whole web service running in authenticed mode. I want to run a piece of code under the context of currently logged on user. Jayant