TheWizardofInt Posted February 21, 2003 Posted February 21, 2003 Does anyone have a code example for how to impersonate another user on the web server. My ASPNET user can't access the active x dll that I have to use, and rather than spend three more days trying to figure it out I am going to try using a different user. Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
*Gurus* Derek Stone Posted February 21, 2003 *Gurus* Posted February 21, 2003 <!-- In web.config --> <identity impersonate="true" /> [mshelp]ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconaspnetimpersonation.htm[/mshelp] Quote Posting Guidelines
TheWizardofInt Posted February 21, 2003 Author Posted February 21, 2003 Thanks for the fast reply I tried this: <identity impersonate="true" userName="BOB" password=""/> <authentication mode="Windows" /> And it came back as unable to verify. I also tried it with the PC name before BOB with a slash Any ideas? Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
TheWizardofInt Posted February 21, 2003 Author Posted February 21, 2003 Ok, found out how to do this Create a User in Windows with a password (the thing has trouble with blank passwords) Give the User the rights you want it to have In Machine.Config, which is in the WINNT/Microsoft.Net/Framework/(numeric)/Config directory, seach for the userName=(machine) and reset the username and password to the new user Use THIS and not the web.congif file, and it works really well Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.