Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the Assemblies for an ASP.NET Web Site When Running IIS Express

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.

like image 204
SaltProgrammer Avatar asked Aug 13 '13 04:08

SaltProgrammer


People also ask

Where are .NET assemblies located?

An assembly can be found mostly in either of the following places: GAC - C:\Windows\Assembly\GAC (Microsoft provided and by third-party in some cases)

Where does IIS Express store files?

IIS Express uses a default, user-specific ApplicationHost. config file to allow many users to share the same computer without interfering with other user's settings. This file is located in the %userprofile%\Documents\IISExpress\config folder or %userprofile%\My Documents\IISExpress\config folder, depending on your OS.

How deploy ASP.NET web application in IIS Express?

Make the web project as start up. Run the project . Click on right click on the IIS Express and say show all applications . IIS Express Opens up .

Where the compiled files of ASP.NET applications are stored?

The APP_CODE folder is a special folder in an ASP.NET 2.0 project and any non-page or control-related source code in your Web project must go into this folder. ASP.NET treats the content of APP_CODE like a library project and compiles the content into a separate assembly.


2 Answers

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

like image 130
T.S. Avatar answered Oct 19 '22 18:10

T.S.


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/

like image 33
Bryan Avatar answered Oct 19 '22 16:10

Bryan