简体   繁体   English

IIS如何知道哪些DLL用于Visual Studio项目

[英]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. 在我的开发机器上,我有IIS指向我的ASP.NET web api项目的根项目文件夹,这是有效的。 So my question is, how does IIS know that the dll's are in the "bin" folder, and not in the root? 所以我的问题是,IIS如何知道dll是在“bin”文件夹中,而不是在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? 除此之外,我已经切换了我的CPU目标,所以现在bin文件夹中有很多dll,那么IIS如何知道在“bin”文件夹中使用哪个dll,是否有办法配置哪个dll是它使用?

It is not IIS but the ASP.NET module (either aspnet_isapi.dll or webengine4.dll ) who loads your assemblies. 它不是IIS,而是加载程序集的ASP.NET模块( aspnet_isapi.dllwebengine4.dll )。 More information can be found in 更多信息可以在中找到

https://blog.lextudio.com/the-rough-history-of-asp-net-on-iis-8f49e2bcefcd 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). 首先检查Global.asax (硬编码名称)以了解要加载的HttpApplication派生类(作为传入请求的ASP.NET管道)。
  • Then scans the assemblies in bin ( bin is hardcoded) to locate the actual HttpApplication derived class. 然后扫描bin的程序集( bin是硬编码的)以找到实际的HttpApplication派生类。 Its protected void Application_Start() method is called to perform all registration (routing and so on). 调用其protected void Application_Start()方法来执行所有注册(路由等)。

So IIS has no idea what ASP.NET is. 所以IIS不知道ASP.NET是什么。 It is ASP.NET that hooks to IIS via the standard interfaces. ASP.NET是通过标准接口挂钩到IIS的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS 不运行 Visual Studio 2017 中的项目 - IIS does not run the project in Visual Studio 2017 Visual Studio项目随机命名的DLL - Visual Studio project randomly named DLLs 如何将 Visual Studio 项目 FTP 设置到远程 IIS 服务器? - How to setup Visual Studio project FTP to a remote IIS Server? 如何在Visual Studio项目中更改IIS Express站点名称 - How to change IIS Express site name in Visual studio project 如何在Visual Studio Express 2013中通过本地IIS运行Web项目 - How to run web project by local IIS in visual studio express 2013 将项目中未引用的dll复制到Visual Studio 2012中的已发布文件夹中 - Copy dlls that are not referenced in the project into published folder in Visual Studio 2012 在没有 IIS 的情况下,浏览器中的视图选项如何在 Visual Studio 中工作? - How does the view in browser option work in Visual Studio without IIS? 在具有IIS但没有Visual Studio的系统上运行.net项目 - Run a .net project on a system with IIS but no Visual Studio 在Visual Studio 2013中创建新项目时,出现错误,因为它们会自动尝试使用IIS express - When creating a new project in Visual studio 2013 I get an error because they are automatically trying to use IIS express 内存中的HttpServer如何知道要托管哪个WebAPI项目? - How does the In-Memory HttpServer know which WebAPI project to host?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM