Re: Running asp page as particular user

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jeff Cochran (jeff.nospam_at_zina.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 15:44:27 GMT

On Thu, 19 Aug 2004 06:03:03 -0700, "Peter"
<Peter@discussions.microsoft.com> wrote:

>Please, could anybody tell me, is it possible to run an asp page as
>particular user?

ASP pages run in the context of whatever user runs them. In the case
of anonymous access, this is the anonymous user account. In the case
of Windows Authentication, this is the Windows account that
authenticated.

>I have this situation where I have one shared folder on particular server
>and this folder is shared for just one user to access it. I wrote an asp page
>wich should open a file from that shared folder. However because the folder
>is shared for just one user I have somehow to run the asp page as this user.

No, what you need to do is provide the proper permissions to the
file/folder that needs access. It makes no sense to lock a folder
down to only one user but impersonate that user for access when you
can simply provide the required access.

>The same way like in ASP.NET application where I can use impersonation in
>web.config file. Is this possible?

ASP doesn't do impersonation, but you could possibly stream the file
from the folder and impersonate the user in question. Or use ASP.NET
to access the file.

Or simply provide the required access in the first place. :)

Jeff



Relevant Pages

  • Re: Access97 DB locks up the asp code at times
    ... of these users created the query off the asp and that's the problem. ... but I could never see the employee.ldb on the folder ... I'll chat with our IT group about setting the proper permissions. ... All database users, including the IUSR_MachineName account, need ...
    (microsoft.public.inetserver.asp.general)
  • Re: Drop down is not displaying over frames
    ... This will work with all your pages, no matter which folder they are in, so you only have the single copy of ADOVBS.INC to edit. ... dwt pages instead of frames) I would have to move ADOVBS.INC to the root ... subfolders - does that mean that if I wanted to always include the asp footer ...
    (microsoft.public.frontpage.programming)
  • .NET Framework Configuration Issue
    ... presentation layer in ASP. ... COM Interop), ASP pages, and a few .NET Web Services. ... Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) ... I just opened my "Temporary ASP .NET Files" folder to Everyone, ...
    (microsoft.public.dotnet.general)
  • Re: File System Object Lockdown...possible?
    ... What I don't understand is that when I look at the folder he ... the anonymous user is NOT listed as having any security rights. ... Now, for some ASP events, a request is NOT ... This leads to apparently both IUSR and IWAM ...
    (microsoft.public.inetserver.iis.security)
  • Re: Windows Only Authentication
    ... access an ASP page in the secured folder. ... > At this point the logs show they are logged into IIS. ... It takes accessing another HTM file ...
    (microsoft.public.sqlserver.security)