473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ASP.NET Temp directory


Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva

Nov 19 '05 #1
6 4381
string s = @"C:\WINDOWS\Microsoft.NET\Framework\{version}\Tem porary ASP.NET
Files";

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

<sa***********@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...

Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva
Nov 19 '05 #2
Actually, what I meant to say was, it isn't stored somewhere, except in your
machine.config file. You could, I imagine, open the file as an XML document
and find the "tempDirectory" node under "compilation" under "system.web"
element to read it. I believe you can also override it in the web.config,
but you can't use the ConfigurationSettings class to read it. You would
still have to open it as an XML file.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

<sa***********@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...

Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva
Nov 19 '05 #3
In Kevin's example you would have to hard code the {version} of the .NET
framework you want to use and/or the folder path. As a catch all situation,
you could retrieve this location where your page is being loaded from by:
System.Reflection.Assembly.GetExecutingAssembly.Lo cation.ToString()

<sa***********@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...

Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva
Nov 19 '05 #4
Well, I've learned something today. :-D

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Tampa.NET Koder" <an*******@microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
In Kevin's example you would have to hard code the {version} of the .NET
framework you want to use and/or the folder path. As a catch all
situation, you could retrieve this location where your page is being
loaded from by:
System.Reflection.Assembly.GetExecutingAssembly.Lo cation.ToString()

<sa***********@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...

Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva

Nov 19 '05 #5
Maybe taking a look at Christoph Wille's samples for
"Directory Browsing the .NET Way" :
http://www.aspheute.com/english/20000804.asp
would give a hint as to how to do that.

The System.IO namespace is full of wonders... ;-)

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:Or**************@TK2MSFTNGP09.phx.gbl...
Actually, what I meant to say was, it isn't stored somewhere, except in
your machine.config file. You could, I imagine, open the file as an XML
document and find the "tempDirectory" node under "compilation" under
"system.web" element to read it. I believe you can also override it in the
web.config, but you can't use the ConfigurationSettings class to read it.
You would still have to open it as an XML file.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

<sa***********@hotmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...

Hi,
Does anyone know how to retrieve
"C:\WINDOWS\Microsoft.NET\Framework\{version}\Temp orary ASP.NET Files"
directory name programmatically ?

Thanks in advance.

Sérgio Silva

Nov 19 '05 #6

Hi,

I choose to get it from current appdomain temporary directory.

AppDomain.CurrentDomain.SetupInformation.CachePath ;

The return is C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary
ASP.NET Files\2.0.0_scriptenginehost\407724a3

It's fine with me.

Thanks to all

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Adam Parkin | last post by:
I was wondering, what's the "proper" (hehe) way to retrieve the system's temp directory in VB 6. Like for example, on my Windows XP machine the temp directory that is used by programs for their...
1
by: john bailo | last post by:
I noticed for the first time there is a temp directory in the \winnt\system32 directory. For a web services application, this caused me grief as when the server c: drive filled up, the temp...
0
by: Matthew Fitzpatrick | last post by:
My application has a settings class that is serialized to save and deserialized to load. I'm having a problem where i catch the WM_QUERYENDSESSION event via WinProc to save my application's...
5
by: Patrick | last post by:
Hello - I am working on a program that creates a small temp file. The ideal would be it creates the file in the user %temp% directory - whatever that is - the default is %USERPROFILE%\Local...
2
by: Lars Netzel | last post by:
I'm trying to write a PDF to disk on the server (crystal reports export) I'm getting aproblem that Access is denied to save the file to disk and reading here (you don't need to read):...
10
by: robwharram | last post by:
Hi, I'm quite frustrated in the fact that I can't even display a simple "Hello World" message on .Net. I've been through all of the groups and searched all over the place and haven't been able...
0
by: Andrés G. Aragoneses | last post by:
When trying to use a webservices, not very often I obtain the following exception: Server was unable to process request. ---> Access to the temp directory is denied. Identity 'NT...
6
by: Najd | last post by:
Hi All, I'm developping a DLL that requiers the path of the Temp directory of the user logged. I used GetTempPath(), GetEnvironmentVariable() and ExpandEnvironmentStrings(), but the 3 methodes...
0
by: oritc123 | last post by:
Hello . I am having the following error when I run my application under Windows Vista ( it runs fine under Windows XP ) : "Access to the temp directory is denied. Identity 'ORITSLAPTOP\orit'...
6
by: Aussie Rules | last post by:
Hi, In my application I need to write an XML file to disk, but am concerned that permission might be a problem. The file only needs to be written out and used for another reason and can then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.