Re: How to get location of "Temporary ASP.NET Files" folder

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>>
>
>


.



Relevant Pages

  • How to get location of "Temporary ASP.NET Files" folder
    ... The only solution I have is to get the registry value of ... and append .NET version and "Temporary ASP.NET Files". ... Ajay ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • Re: Write to Registry
    ... In addition to what Ajay wrote remember you can use AfxGetApp() to get at ... > How to write to registry from MFC 6.0? ... Prev by Date: ...
    (microsoft.public.vc.mfc)
  • "Visual Basic Scripting Support" message
    ... What happens after installing the update, ... The only quikfix is to restore a prev. ... So before you try this update, backup your registry!!! ... >Upon trying to download the component I get the message: ...
    (microsoft.public.security)
  • Re: On the stability of Delphi 2005 and components
    ... >registry is, or other factors resulting from not having many other programs ... My impression is the VM people were setting up sessions for specific ... Prev by Date: ...
    (borland.public.delphi.non-technical)
  • Re: GetCurrentDirectory API
    ... Upon further testing of my app generally, I noticed the problem only occured ... when the exe started at Windows start-up via the registry. ... Prev by Date: ...
    (microsoft.public.vc.language)