简体   繁体   中英

How does IIS know which DLLs to use for a Visual Studio project

On my development machine, I have IIS pointed to the root project folder of my ASP.NET web api project, and this works. So my question is, how does IIS know that the dll's are in the "bin" folder, and not in the root? In addition to this, i have switched my CPU target, so now there are lots of dll's in the bin folder, so how does IIS know which dll's to use in the "bin" folder, and is there a way to configure which dll's it uses?

It is not IIS but the ASP.NET module (either aspnet_isapi.dll or webengine4.dll ) who loads your assemblies. More information can be found in

https://blog.lextudio.com/the-rough-history-of-asp-net-on-iis-8f49e2bcefcd

The actual loader

  • First checks Global.asax (hardcoded name) to know which HttpApplication derived class to load (as ASP.NET pipeline for incoming requests).
  • Then scans the assemblies in bin ( bin is hardcoded) to locate the actual HttpApplication derived class. Its protected void Application_Start() method is called to perform all registration (routing and so on).

So IIS has no idea what ASP.NET is. It is ASP.NET that hooks to IIS via the standard interfaces.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM