简体   繁体   中英

IIS doesn't notice updated controller

On IIS 7 I have an application running which uses Entity Framework Web API. When I copy and replace one of the .cshtml (HTML and JS) files in the Views folder, the change is applied instantly.

But when I replace one of the controllers, changes take no effect.

I restarted the IIS using the GUI, via Run | IISReset Run | IISReset command and after this didn't work even restarted the computer. However, IIS still uses the old version of the controller.

How can I make IIS "recompile" the project and use the new controller version?

Update : Replacing the bin directory helped me out. Is there still another way to recompile directly on IIS?

Mvc is web application and precompile is available only on website projects

Compilation

Web application projects

  • You explicitly compile the source code on the computer that is used for development or source control.
  • By default, compilation of code files (excluding .aspx and .ascx files) produces a single assembly.

Web site projects

  • The source code is typically compiled dynamically (automatically) by ASP.NET on the server the first time a request is received after the site has been installed or updated.

  • You can precompile the site (compile in advance on a development computer or on the server). By default, compilation produces multiple assemblies.

More info

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