temp folder?

  • Thread starter Dominick Baier [DevelopMentor]
  • Start date
D

Dominick Baier [DevelopMentor]

hi,

1. you need the temp asp.net folder for the dynamically generated page assemblies
and \windows\temp is used for example for dynamically generated assemblies
from XmlSerializer

2. i think it uses the temp variable of the worker process account for \windows\temp
- the asp.net temp folder can be configured using the <compilation> element
in web.config
 
J

js

Hi, I have two applications work fine in the test environment(win 2003
server). but after moved to production server(win 2003 too), I need to gave
c:\windows\microsoft.net\frameswork\v2.0.50727\temporary asp.net files\ for
one and c:\windows\temp for another to run. If I don't, I will get error:
The current identity \WEB007\Appx_web does not have write access to c:\path.
and it's from System.Web.HttpException.

The host environment don't allow special settings outside the application
path. so i have three questions here:
1. why I need to write right in the system temp folder?
2. can I configure so it will point to a temp folder under it subfolder?
3 is it relate to the application pool settings?

Please advice.
Thanks in advance.
 
J

js

Thanks Dominick.

I found compilation section, but don't know to to set it up? Can you please
help? just give me an sample to change to default temp folder other than
system temp.
 
H

Henning Krause [MVP]

Hello,

you need to add a "tempDirectory" attribute to the <compilation> tag in you
web.config.

Set the value of this attribute the name of the temporary directory.

Greetings,
Henning Krause

js said:
I'm using NET 2.0.

Many thanks,



Dominick Baier said:
which version?

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Thanks Dominick.

I found compilation section, but don't know to to set it up? Can you
please help? just give me an sample to change to default temp folder
other than system temp.

"Dominick Baier [DevelopMentor]"

hi,
1. you need the temp asp.net folder for the dynamically generated
page
assemblies and \windows\temp is used for example for dynamically
generated
assemblies from XmlSerializer
2. i think it uses the temp variable of the worker process account
for \windows\temp - the asp.net temp folder can be configured using
the <compilation> element in web.config

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Hi, I have two applications work fine in the test environment(win
2003 server). but after moved to production server(win 2003 too), I
need to gave
c:\windows\microsoft.net\frameswork\v2.0.50727\temporary asp.net
files\ for one and c:\windows\temp for another to run. If I don't, I
will get error: The current identity \WEB007\Appx_web does not have
write access to c:\path. and it's from System.Web.HttpException.

The host environment don't allow special settings outside the
application
path. so i have three questions here:
1. why I need to write right in the system temp folder?
2. can I configure so it will point to a temp folder under it
subfolder?
3 is it relate to the application pool settings?
Please advice.
Thanks in advance.
 
J

js

Thanks Henning,

Can it be related path or has to be "c:\myapp\mytemp\?


Henning Krause said:
Hello,

you need to add a "tempDirectory" attribute to the <compilation> tag in
you web.config.

Set the value of this attribute the name of the temporary directory.

Greetings,
Henning Krause

js said:
I'm using NET 2.0.

Many thanks,



Dominick Baier said:
which version?

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Thanks Dominick.

I found compilation section, but don't know to to set it up? Can you
please help? just give me an sample to change to default temp folder
other than system temp.

"Dominick Baier [DevelopMentor]"

hi,
1. you need the temp asp.net folder for the dynamically generated
page
assemblies and \windows\temp is used for example for dynamically
generated
assemblies from XmlSerializer
2. i think it uses the temp variable of the worker process account
for \windows\temp - the asp.net temp folder can be configured using
the <compilation> element in web.config

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Hi, I have two applications work fine in the test environment(win
2003 server). but after moved to production server(win 2003 too), I
need to gave
c:\windows\microsoft.net\frameswork\v2.0.50727\temporary asp.net
files\ for one and c:\windows\temp for another to run. If I don't, I
will get error: The current identity \WEB007\Appx_web does not have
write access to c:\path. and it's from System.Web.HttpException.

The host environment don't allow special settings outside the
application
path. so i have three questions here:
1. why I need to write right in the system temp folder?
2. can I configure so it will point to a temp folder under it
subfolder?
3 is it relate to the application pool settings?
Please advice.
Thanks in advance.
 
J

js

I did, but still have error if I remove everyone from c:\windows\temp\
folder:
Unhandled Error
Error Details
File
Error Unable to generate a temporary class (result=1). error CS2001:
Source file 'C:\WINDOWS\TEMP\omxg26yp.0.cs' could not be found error CS2008:
No inputs specified


How to fix?
Please advice. Thanks.

Henning Krause said:
Hello,

you need to add a "tempDirectory" attribute to the <compilation> tag in
you web.config.

Set the value of this attribute the name of the temporary directory.

Greetings,
Henning Krause

js said:
I'm using NET 2.0.

Many thanks,



Dominick Baier said:
which version?

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Thanks Dominick.

I found compilation section, but don't know to to set it up? Can you
please help? just give me an sample to change to default temp folder
other than system temp.

"Dominick Baier [DevelopMentor]"

hi,
1. you need the temp asp.net folder for the dynamically generated
page
assemblies and \windows\temp is used for example for dynamically
generated
assemblies from XmlSerializer
2. i think it uses the temp variable of the worker process account
for \windows\temp - the asp.net temp folder can be configured using
the <compilation> element in web.config

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Hi, I have two applications work fine in the test environment(win
2003 server). but after moved to production server(win 2003 too), I
need to gave
c:\windows\microsoft.net\frameswork\v2.0.50727\temporary asp.net
files\ for one and c:\windows\temp for another to run. If I don't, I
will get error: The current identity \WEB007\Appx_web does not have
write access to c:\path. and it's from System.Web.HttpException.

The host environment don't allow special settings outside the
application
path. so i have three questions here:
1. why I need to write right in the system temp folder?
2. can I configure so it will point to a temp folder under it
subfolder?
3 is it relate to the application pool settings?
Please advice.
Thanks in advance.
 
H

hB

In your configuration file:

<system.diagnostics>
<switches>
<add name="XmlSerialization.Compilation" value="0" />
</switches>
</system.diagnostics>
</configuration>

This would stop XMLSerializer to generated Temporary files.

But What I want to know that Why XMLSerializer is generating files and
running csc?
Also In my desktop application (Thick VBNet DotNet WinForm client) on
my development machine XMLSerializer is creating around 126 temp files
in temp dir, while on other Developer's machine it is not creating any
single temp file, why is that? how can I stop XMLSerializer to not to
generate them the same way as on other developer's machine it is not
generating. (Instead of disabling it from config file)

Also to mention it creates temp files differently everytime I launch my
application, it does not reuse previously built files which were always
there and eating my hdd.
 
D

Dinis Cruz

js, what do you mean by "...The host environment don't allow special
settings outside the application path..."

Is that for security? If so what are you trying to achieve?

(I'm assuming that your code runs with Full Trust)

Dinis Cruz
Owasp .Net Project
www.owasp.net
 
D

Dinis Cruz

js, what do you mean by "...The host environment don't allow special
settings outside the application path..."

Is that for security? If so what are you trying to achieve?

(I'm assuming that your code runs with Full Trust)

Dinis Cruz
Owasp .Net Project
www.owasp.net
 

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,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top