开发者

How to find DLLs loaded by a web application?

开发者 https://www.devze.com 2023-04-06 13:09 出处:网络
is there a way in .NET to clearly see what are the DLLs that a process (in this case an IIS process) has loaded to run an application?

is there a way in .NET to clearly see what are the DLLs that a process (in this case an IIS process) has loaded to run an application?

It is a general question out of curiosity (I can't recall any way to inspect开发者_JAVA百科 a .NET process and find out what DLLs it is using) and also because I have both Oracle DLLs (x86 and x64) running and I would like to make sure which is one is being used my app for debugging purposes.

Thanks a lot!


I tried this and it worked perfectly:

var assemblies = AppDomain.CurrentDomain.GetAssemblies();

According to MSDN:

Summary: Gets the assemblies that have been loaded into the execution context of this application domain.

if you run this code in your ASP.NET application the output will contain:

  • GAC assemblies like mscorlib, System.Web, etc.
  • Custom assemblies referenced in your app
  • Dynamic DLLs built for your pages and user controls, global.ascx, etc... (usually having log weird names)
0

精彩评论

暂无评论...
验证码 换一张
取 消