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.
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)
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.
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 .
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.
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
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With