Run ASP.NET Scripts as different User

W

William

I have this ASP.NET script that i use for creating tables
of files in a folder for users. The problem is that if
the user changes the username to create the list of files
for, they can see the files but now download them (NTFS
permissions). I noticed that the Network Service account
requires list directory access so it gets round my
permissions. How do i get the script to run as the user
logged on via the site (Windows Authentication) instead
of the network service account?
 
R

Roland Hall

in message : I have this ASP.NET script that i use for creating tables
: of files in a folder for users. The problem is that if
: the user changes the username to create the list of files
: for, they can see the files but now download them (NTFS
: permissions). I noticed that the Network Service account
: requires list directory access so it gets round my
: permissions. How do i get the script to run as the user
: logged on via the site (Windows Authentication) instead
: of the network service account?

Hi William...

The topic here is Classic ASP. All .NET NGs have dotnet in their name.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
W

William

Sorry about that, i didn't know, i was just looking in
IIS because i thought it was an IIS problem and ASP and
this seemed to be the closest match. Can you link me
where i'd get the help i need please?
 
R

Roland Hall

in message : Sorry about that, i didn't know, i was just looking in
: IIS because i thought it was an IIS problem and ASP and
: this seemed to be the closest match. Can you link me
: where i'd get the help i need please?

Try...

microsoft.public.dotnet.framework..aspnet
microsoft.public.dotnet.framework..aspnet.security

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
W

William

Thanks for that but i fortunatly fixed my issue by just
editing the script to check the logged in user.
 
R

Roland Hall

in message : Thanks for that but i fortunatly fixed my issue by just
: editing the script to check the logged in user.

Not a waste and glad you got it working. I posted the other NGs to help you
get your answer quicker. It will still be relevant next time.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top