Directory and files names in temporary asp.net directory

G

Guest

Has anyone any idea how asp.net find it's files back after compiling them to
the temporary asp.net directory?
I found on numerous webpages that the directorynames are chosen random but
cannot find how asp.net find's it's compiled files when asking for the same
webpage which was complied before.
 
J

Juan T. Llibre

If you look in the "Temporary ASP.NET files" directory, Bas,
you'll see that there's some files named *.compiled.

The content of those files looks like this:
<preserve resultType="3" virtualPath="/test/version.aspx" hash="fffffff2069266bf"
filehash="387997735d36" flags="10000" assembly="jnkylo3_" type="ASP.version_aspx">
<filedeps>
<filedep name="/test/version.aspx" />
</filedeps>
</preserve>
-------------

Those are references to the compiled results, including
all the references ASP.NET needs to find the assemblies.

The .Net Framework has a specified search order,
known as a "probing order" for assemblies.

They, roughly, go :

Application /bin directory

GAC
( It could be ther other way around, first GAC and the /bin.
I don't remember off the top of my head. )

AppDomain base directory

Specified assembly path
( System.Reflection.Assembly.LoadFrom
CreateInstanceFrom() , or ExecuteAssembly() )

Temporary ASP.NET files directory.

When the .Net Framework finds a reference to
virtualPath="/test/version.aspx, for example,
it searches the Temporary ASP.NET files directory
for the path to the compiled assembly.




Juan T. Llibre
ASP.NET MVP
===========
 
G

Guest

Juan,

Thankx for your reaction.

In the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\
directory there's only one directory called root and no files in the root
directory there are for each website an directory e.g. 2135a508 in this
directory there is an directory 8d69a834 and in there there are finally files.
but none of them are called *.compiled
But there are dll and xml files. For each page there is an xml file and in
this xml file:
"<preserve assem="mo3qgwuw" type="_ASP.Navigation_aspx"
hash="bc6e0850ec81ee27" batch="true">
<filedep name="c:\inetpub\wwwroot\bin\ReportViewer.DLL" />
<filedep name="c:\inetpub\wwwroot\Navigation.aspx" />
<filedep name="c:\inetpub\wwwroot\bin\Microsoft.Web.UI.WebControls.DLL" />
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
</preserve>"

is something like assem="mo3qgwuw" so the dll belonging to it is mo3qgwuw.dll
so far so good.
but how does asp.net find some webpage back after compiling it in e.g.
2135a508\8d69a834?
and when does it uses the
2135a508\8d69a834\assembly\dl2\6df106b3\0053f275_76fdc401\nea.dll which is
the dll in which some of the webpages refer to:
( <filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />)
This last dll is precompiled by a third party so i have no source
code/cannot recompile it.

any suggestions?

greetings,
Bas Hendriks
PinkRoccade
 
J

Juan T. Llibre

Hi, Bas.

I'm sorry. I should have specified that
those references are for ASP.NET 2.0.

For ASP.NET 1.1 the methods are different and,
indeed, as you already know, the references are
stored in the *.xml files found in the directories
under the "Temporary ASP.NET Directory".

For 1.1., the <filedep name="....> which you reference, like
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
refers to the assemblies which are referenced in any one
compiled .aspx page's assembly.

If you dig into the "Temporary ASP.NET Directory"
for ASP.NET 1.1, you'll also find some .ini files,
named __AssemblyInfo__.ini, which look like this :

[AssemblyInfo]
MVID=e43116d6469bac458674beab3c9805e1
URL=file:///H:/serverpath/bin/Dllname.DLL
DisplayName=Dllname, Version=2004.7.1671.18845, Culture=neutral,
PublicKeyToken=null
which refers to the assemblies in the /bin directory.

re:
but how does asp.net find some webpage back after
compiling it in e.g. 2135a508\8d69a834?

By using the "probing order" which
I detailed in my previous message.

re:
This last dll is precompiled by a third party so
i have no source code/cannot recompile it.

It wouldn't matter anyway since, if you recompile it,
the reference to the new version of the assembly
would be written into the xml and/or the .ini files
for that particular assembly.




Juan T. Llibre
ASP.NET MVP
===========
 
G

Guest

Juan,

I did some additional reading and found following:

Retrieve Framework Directory
http://weblogs.asp.net/ngur/archive/2004/06/21/161440.aspx

and

The ASP.NET HTTP Runtime
The Long and Winding Road of a Request from the URL String to the HTML Code
http://msdn.microsoft.com/asp.net/u...-us/dnaspp/html/dngrftheaspnethttpruntime.asp

and

HttpRuntime Class
http://msdn.microsoft.com/library/d.../html/frlrfsystemwebhttpruntimeclasstopic.asp



Give:

page.aspx:

<HTML>
<HEAD>
<script language="vb" runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim info As String = ""
Dim nl As String = "<br>"

info = info + HttpRuntime.AppDomainAppId + nl
info = info + HttpRuntime.AppDomainAppPath + nl
info = info + HttpRuntime.AppDomainAppVirtualPath + nl
info = info + HttpRuntime.AppDomainId + nl
info = info + HttpRuntime.AspInstallDirectory + nl
info = info + HttpRuntime.BinDirectory + nl
info = info + HttpRuntime.ClrInstallDirectory + nl

info = info + HttpRuntime.CodegenDir + nl

info = info + HttpRuntime.IsOnUNCShare.ToString() + nl
info = info + HttpRuntime.MachineConfigurationDirectory + nl
Response.Write(info)
End Sub
</script>
</HEAD>

<body>
<form runat="server"></form>
</body>
</HTML>

en dat levert:

"/LM/W3SVC/1790418377/Root
D:\testweb1\
/
/LM/W3SVC/1790418377/Root-3-127516323520937500
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
D:\testweb1\bin\
c:\windows\microsoft.net\framework\v1.1.4322

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\56ba5423\12a91f28

False
c:\windows\microsoft.net\framework\v1.1.4322\Config
"

this gives the directory name in the asp.net temp dir.

see also:

The ASP.NET Page Factory Object
http://www.dotnet2themax.com/ShowContent.aspx?ID=750fdf64-9ff5-460f-85b2-908d7941e0fe&Page=3&#RET

Chapter 2. Web Forms Internals
http://www.dotnet2themax.com/ShowContent.aspx?ID=750fdf64-9ff5-460f-85b2-908d7941e0fe&Page=0&#RET

thankx again for your respons.

greetings,
Bas Hendriks
Pinkroccade


Juan T. Llibre said:
Hi, Bas.

I'm sorry. I should have specified that
those references are for ASP.NET 2.0.

For ASP.NET 1.1 the methods are different and,
indeed, as you already know, the references are
stored in the *.xml files found in the directories
under the "Temporary ASP.NET Directory".

For 1.1., the <filedep name="....> which you reference, like
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
refers to the assemblies which are referenced in any one
compiled .aspx page's assembly.

If you dig into the "Temporary ASP.NET Directory"
for ASP.NET 1.1, you'll also find some .ini files,
named __AssemblyInfo__.ini, which look like this :

[AssemblyInfo]
MVID=e43116d6469bac458674beab3c9805e1
URL=file:///H:/serverpath/bin/Dllname.DLL
DisplayName=Dllname, Version=2004.7.1671.18845, Culture=neutral,
PublicKeyToken=null
which refers to the assemblies in the /bin directory.

re:
but how does asp.net find some webpage back after
compiling it in e.g. 2135a508\8d69a834?

By using the "probing order" which
I detailed in my previous message.

re:
This last dll is precompiled by a third party so
i have no source code/cannot recompile it.

It wouldn't matter anyway since, if you recompile it,
the reference to the new version of the assembly
would be written into the xml and/or the .ini files
for that particular assembly.




Juan T. Llibre
ASP.NET MVP
===========
Bas Hendriks said:
Juan,

Thankx for your reaction.

In the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\
directory there's only one directory called root and no files in the root
directory there are for each website an directory e.g. 2135a508 in this
directory there is an directory 8d69a834 and in there there are finally
files.
but none of them are called *.compiled
But there are dll and xml files. For each page there is an xml file and in
this xml file:
"<preserve assem="mo3qgwuw" type="_ASP.Navigation_aspx"
hash="bc6e0850ec81ee27" batch="true">
<filedep name="c:\inetpub\wwwroot\bin\ReportViewer.DLL" />
<filedep name="c:\inetpub\wwwroot\Navigation.aspx" />
<filedep name="c:\inetpub\wwwroot\bin\Microsoft.Web.UI.WebControls.DLL"
/>
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
</preserve>"

is something like assem="mo3qgwuw" so the dll belonging to it is
mo3qgwuw.dll
so far so good.
but how does asp.net find some webpage back after compiling it in e.g.
2135a508\8d69a834?
and when does it uses the
2135a508\8d69a834\assembly\dl2\6df106b3\0053f275_76fdc401\nea.dll which is
the dll in which some of the webpages refer to:
( <filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />)
This last dll is precompiled by a third party so i have no source
code/cannot recompile it.

any suggestions?

greetings,
Bas Hendriks
PinkRoccade
 
J

Juan T. Llibre

Bas,

Thanks for sharing your addtional research,
which confirms and expounds on my earlier posts.

Funny you should point to an article by Dino Esposito,
as I just talked to him last week.

The explanation at
http://www.dotnet2themax.com/ShowContent.aspx?ID=750fdf64-9ff5-460f-85b2-908d7941e0fe&Page=3&#RET
is the shortest, simplest, explanation I've seen.

Dino has accustomed us to getting
the best info there is...from him.

Thanks!



Juan T. Llibre
ASP.NET MVP
===========
Bas Hendriks said:
Juan,

I did some additional reading and found following:

Retrieve Framework Directory
http://weblogs.asp.net/ngur/archive/2004/06/21/161440.aspx

and

The ASP.NET HTTP Runtime
The Long and Winding Road of a Request from the URL String to the HTML
Code
http://msdn.microsoft.com/asp.net/u...-us/dnaspp/html/dngrftheaspnethttpruntime.asp

and

HttpRuntime Class
http://msdn.microsoft.com/library/d.../html/frlrfsystemwebhttpruntimeclasstopic.asp



Give:

page.aspx:

<HTML>
<HEAD>
<script language="vb" runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim info As String = ""
Dim nl As String = "<br>"

info = info + HttpRuntime.AppDomainAppId + nl
info = info + HttpRuntime.AppDomainAppPath + nl
info = info + HttpRuntime.AppDomainAppVirtualPath + nl
info = info + HttpRuntime.AppDomainId + nl
info = info + HttpRuntime.AspInstallDirectory + nl
info = info + HttpRuntime.BinDirectory + nl
info = info + HttpRuntime.ClrInstallDirectory + nl

info = info + HttpRuntime.CodegenDir + nl

info = info + HttpRuntime.IsOnUNCShare.ToString() + nl
info = info + HttpRuntime.MachineConfigurationDirectory + nl
Response.Write(info)
End Sub
</script>
</HEAD>

<body>
<form runat="server"></form>
</body>
</HTML>

en dat levert:

"/LM/W3SVC/1790418377/Root
D:\testweb1\
/
/LM/W3SVC/1790418377/Root-3-127516323520937500
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
D:\testweb1\bin\
c:\windows\microsoft.net\framework\v1.1.4322

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\56ba5423\12a91f28

False
c:\windows\microsoft.net\framework\v1.1.4322\Config
"

this gives the directory name in the asp.net temp dir.

see also:

The ASP.NET Page Factory Object
http://www.dotnet2themax.com/ShowContent.aspx?ID=750fdf64-9ff5-460f-85b2-908d7941e0fe&Page=3&#RET

Chapter 2. Web Forms Internals
http://www.dotnet2themax.com/ShowContent.aspx?ID=750fdf64-9ff5-460f-85b2-908d7941e0fe&Page=0&#RET

thankx again for your respons.

greetings,
Bas Hendriks
Pinkroccade


Juan T. Llibre said:
Hi, Bas.

I'm sorry. I should have specified that
those references are for ASP.NET 2.0.

For ASP.NET 1.1 the methods are different and,
indeed, as you already know, the references are
stored in the *.xml files found in the directories
under the "Temporary ASP.NET Directory".

For 1.1., the <filedep name="....> which you reference, like
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
refers to the assemblies which are referenced in any one
compiled .aspx page's assembly.

If you dig into the "Temporary ASP.NET Directory"
for ASP.NET 1.1, you'll also find some .ini files,
named __AssemblyInfo__.ini, which look like this :

[AssemblyInfo]
MVID=e43116d6469bac458674beab3c9805e1
URL=file:///H:/serverpath/bin/Dllname.DLL
DisplayName=Dllname, Version=2004.7.1671.18845, Culture=neutral,
PublicKeyToken=null
which refers to the assemblies in the /bin directory.

re:
but how does asp.net find some webpage back after
compiling it in e.g. 2135a508\8d69a834?

By using the "probing order" which
I detailed in my previous message.

re:
This last dll is precompiled by a third party so
i have no source code/cannot recompile it.

It wouldn't matter anyway since, if you recompile it,
the reference to the new version of the assembly
would be written into the xml and/or the .ini files
for that particular assembly.




Juan T. Llibre
ASP.NET MVP
===========
Bas Hendriks said:
Juan,

Thankx for your reaction.

In the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\
directory there's only one directory called root and no files in the
root
directory there are for each website an directory e.g. 2135a508 in this
directory there is an directory 8d69a834 and in there there are finally
files.
but none of them are called *.compiled
But there are dll and xml files. For each page there is an xml file and
in
this xml file:
"<preserve assem="mo3qgwuw" type="_ASP.Navigation_aspx"
hash="bc6e0850ec81ee27" batch="true">
<filedep name="c:\inetpub\wwwroot\bin\ReportViewer.DLL" />
<filedep name="c:\inetpub\wwwroot\Navigation.aspx" />
<filedep
name="c:\inetpub\wwwroot\bin\Microsoft.Web.UI.WebControls.DLL"
/>
<filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />
</preserve>"

is something like assem="mo3qgwuw" so the dll belonging to it is
mo3qgwuw.dll
so far so good.
but how does asp.net find some webpage back after compiling it in e.g.
2135a508\8d69a834?
and when does it uses the
2135a508\8d69a834\assembly\dl2\6df106b3\0053f275_76fdc401\nea.dll which
is
the dll in which some of the webpages refer to:
( <filedep name="c:\inetpub\wwwroot\bin\NEa.DLL" />)
This last dll is precompiled by a third party so i have no source
code/cannot recompile it.

any suggestions?

greetings,
Bas Hendriks
PinkRoccade



:

If you look in the "Temporary ASP.NET files" directory, Bas,
you'll see that there's some files named *.compiled.

The content of those files looks like this:
<preserve resultType="3" virtualPath="/test/version.aspx"
hash="fffffff2069266bf"
filehash="387997735d36" flags="10000" assembly="jnkylo3_"
type="ASP.version_aspx">
<filedeps>
<filedep name="/test/version.aspx" />
</filedeps>
</preserve>
-------------

Those are references to the compiled results, including
all the references ASP.NET needs to find the assemblies.

The .Net Framework has a specified search order,
known as a "probing order" for assemblies.

They, roughly, go :

Application /bin directory

GAC
( It could be ther other way around, first GAC and the /bin.
I don't remember off the top of my head. )

AppDomain base directory

Specified assembly path
( System.Reflection.Assembly.LoadFrom
CreateInstanceFrom() , or ExecuteAssembly() )

Temporary ASP.NET files directory.

When the .Net Framework finds a reference to
virtualPath="/test/version.aspx, for example,
it searches the Temporary ASP.NET files directory
for the path to the compiled assembly.




Juan T. Llibre
ASP.NET MVP
===========
message
Has anyone any idea how asp.net find it's files back after compiling
them to
the temporary asp.net directory?
I found on numerous webpages that the directorynames are chosen
random
but
cannot find how asp.net find's it's compiled files when asking for
the
same
webpage which was complied before.

--
Bas Hendriks
Technical Specialist
PinkRoccade
The Netherlands
 

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

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top