Getting asp.net to not write to c drive where temporary folders reside?

J

John Dalberg

If an ASP.NET needs to use an Access database and impersonation is turned
on, ASP.NET writes temp files to "Document settings\ServerName\ASPNET\Local
settings\Temp" (in my c drive) even though I have my TMP and TEMP user and
system environment variables set to a folder on another partition.

The framework also writes to the "Temporary ASP.NET Files" folder when it
compiles asp.net pages. That folder also resides in my c drive.

I really do not wish these files to be written to my c drive which is my
system drive because an asp.net user could dump large files in these
folders, filling up the drive and potentially causing a crash.

Is there a way to set up asp.net so that these folders could be moved to
another drive away from the system drive?

TIA
 
D

Dominick Baier [DevelopMentor]

Hello John,

the <compilation> element has a tempDirectory atttribute where you can set
the location of the temporary asp.net assemblies-
 
R

Ravichandran J.V.

Open Windows Explorer, browse to the specific folder, right-click on it,
select Properties, in the Properties dialog, click the Security tab, remove
the ASPNet account from the list (For Win2k).

with regards,

J.v.
 
J

John Dalberg

Open Windows Explorer, browse to the specific folder, right-click on it,
select Properties, in the Properties dialog, click the Security tab, remove
the ASPNet account from the list (For Win2k).

The impersonated user needs access to these folders. Otherwise the asp.net
pages will give an error message. Removing NTFS write permission to a
folder that is needed is not a solution. I was asking how to tell .net to
relocate to another folder.
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top