How does IIS know if it's serving a Web Site or a Web Application project?

后端 未结 4 970
日久生厌
日久生厌 2021-02-01 08:58

I understand that Web Site Projects compile source on-the-fly, and Web Application Projects pre-compile source into a DLL (much like ASP.Net 1.x).

But how is the differe

4条回答
  •  眼角桃花
    2021-02-01 09:42

    Once the website or webapplication is compiled there is no difference for the webserver. The .NET handlers in IIS always:

    1. Compile the ASPX pages.
    2. Jit the constructed assemblies into the temporary files area.
    3. Run the request

    In the scenarios where the site is compiled completely into a single dll there are either still single line ASPX files telling the .NET handlers in IIS where to get the code. Or the ASPX pages can be removed altogether with some extra configuration lines in the web.conig.

    But the short answer is really once compiled they are identical.

提交回复
热议问题