[?] how to change identity to code inside ASPX?

  • Thread starter Thread starter LS
  • Start date Start date
L

LS

I need to access some files from my aspx, but I don't want ASPNET user
itself to access those files (i don't want other aspx files to read those
directories)

I would want to change identity just for that aspx file (I could write
explicitly username and password inside the file, it's not a problem)

Please help me! :-)
 
LS,

Check out the documentation for the Impersonate method on the
WindowsIdentity class. It will show how to change the current identity, and
set it back. Also, you will have to make sure that the ASPNET user (or
whatever user that page is running under) has the right to impersonate other
users.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top