14

I know that with dynamic compilation under an ASP.NET Web Site, code behind files get compiled into Assemblies. Where do these DLL's get stored when running IIS Express? Is it in memory only? I don't see them in the bin folder, or in the temp directory (C:\Windows\Microsoft.NET\Framework[64]\v4.0.30319). Typically I generate them when precompiling them whenever I publish. In this case, though, I don't see them.

Am I missing something?

Thanks.

UPDATE:

I did see dll's under C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\root

So I'm thinking it stores them there? This is Visual Studio 2012, .NET 4.5.

SaltProgrammer
  • 1,045
  • 2
  • 13
  • 29
  • I see in the bin folder, DLL's like EntityFramework, and other Microsoft ones, but I don't see any that that could represent the three pages that I have: About.aspx, Contact.aspx, Default.aspx. All of them are default ones that are generated when creating a default "New Web Site" in Visual Studio. – SaltProgrammer Aug 14 '13 at 02:46

2 Answers2

6

Please refer to this: http://msdn.microsoft.com/en-us/library/e22s60h9%28v=vs.85%29.aspx

It really should be in your Bin folder.

This is additional info for framework 4.5: http://msdn.microsoft.com/en-us/library/hh475319.aspx

T.S.
  • 18,195
  • 11
  • 58
  • 78
  • 4
    Thanks, but don't see it in the Bin folder. Could it be here? C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\root – SaltProgrammer Aug 14 '13 at 04:11
  • Try here: C:\Users\\AppData\Local\assembly\ . I know, when I had click-once application running in the browser, dlls were stored there. But this is, I think, for applications running not in IIS. Also, look under inetpub. This is becoming interesting... – T.S. Aug 14 '13 at 14:00
  • 6
    Temporary files are stored in this location "C:\Users\\AppData\Local\Temp\Temporary ASP.NET Files\root\ – Alberto Spelta Dec 07 '13 at 14:20
3

It's quite likely not your bin folder. Everything gets copied into a set of temp folders.

I wrote a method for just this problem -

private string[] GetAssembly(string[] assemblyNames)
{
    string [] locations = new string[assemblyNames.Length];

    for (int loop = 0; loop <= assemblyNames.Length - 1; loop++)       
    {
         locations[loop] = AppDomain.CurrentDomain.GetAssemblies()
           .Where(a => !a.IsDynamic && a.ManifestModule.Name == assemblyNames[loop])
           .Select(a => a.Location)
           .FirstOrDefault();
    }
    return locations;
}

See this post I wrote on the topic - http://nodogmablog.bryanhogan.net/2015/05/finding-the-location-of-a-running-assembly-in-net/

Zack
  • 2,789
  • 33
  • 60
Bryan
  • 5,065
  • 10
  • 51
  • 68