Re: How to get location of "Temporary ASP.NET Files" folder
- From: "Ajay Choudhary" <ajaychoudhary@xxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 11:38:19 -0400
I found the answer -
Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(),/*MSG0*/"Temporary
ASP.NET Files")
"Jeremy Chapman" <me@xxxxxxxx> wrote in message
news:u16RfpwuFHA.2512@xxxxxxxxxxxxxxxxxxxxxxx
> This is how I do it, there may be a better way, if you find one, I'd love
> to know:
>
> /// <summary>
> /// Returns the path to aspnet script files
> /// </summary>
> /// <param name="pContext"></param>
> /// <returns></returns>
> public static string GetScriptLocation(System.Web.HttpContext pContext)
> {
> string strClientScriptsLocation = "";
> string strVersion = "";
> object pObject = pContext.GetConfig("system.web/webControls");
> if (pObject != null)
> {
> Hashtable pHash = (Hashtable)pObject;
> strClientScriptsLocation = pHash["clientScriptsLocation"].ToString();
> }
>
> strVersion = System.Environment.Version.ToString(3).Replace(".","_");
>
> string strLocation = String.Format(strClientScriptsLocation, "system_web",
> strVersion);
> return strLocation;
> }
>
> "Ajay Choudhary" <ajaychoudhary@xxxxxxxxxxx> wrote in message
> news:Oj0LTAwuFHA.3260@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> Is there a way to find the following path through C# code -
>> "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files"
>>
>> The only solution I have is to get the registry value of
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\
>> and append .NET version and "Temporary ASP.NET Files".
>>
>> Any other idea is greatly appreciated.
>>
>> Thanks,
>> Ajay
>>
>
>
.
- References:
- How to get location of "Temporary ASP.NET Files" folder
- From: Ajay Choudhary
- Re: How to get location of "Temporary ASP.NET Files" folder
- From: Jeremy Chapman
- How to get location of "Temporary ASP.NET Files" folder
- Prev by Date: Re: Write to Windows Event Log
- Next by Date: Re: Window Service Description Question
- Previous by thread: Re: How to get location of "Temporary ASP.NET Files" folder
- Next by thread: regex - should be simple
- Index(es):
Relevant Pages
|