web.config and environment variables  
Author Message
mrotoloni





PostPosted: ASMX Web Services and XML Serialization, web.config and environment variables Top

I'm trying to impersonate a user using the web.config file. It works fine like this:

<identity impersonate="true" userName="MyDomain\MyUser" password="MyPassword" />

Unfortunetly, we have multiple webservers and not all reside in the same domain. The user exists on each machine, but the domain is different. So I'm trying to do something along the lines of:

<identity impersonate="true" userName="%domainuser%\MyUser" password="MyPassword" />

That line of code isn't working. Is there any way to accomplish this without having to keep different web.config files on each server Thanks for any help!


.NET Development4  
 
 
ena





PostPosted: ASMX Web Services and XML Serialization, web.config and environment variables Top

Here is an excellent microsoft knowledge base article that will explain how you can implement impersonation and undo it thru code.

http://support.microsoft.com/kb/306158

hope this helps you...good luck!