An ASP.NET MVC 6 project does not come with a Web.config file by default. However, if you want to use IIS, then you need to add one under the wwwroot folder. There seems to be very little information about running MVC 6 sites under IIS (Which 99% of people would want to do).
- How do you go about creating a Debug/Release or in the new world Development/Staging/Production version of the Web.config file.
- The appSettings and connectionStrings are now deprecated in favour of the new Configuration model.
- Can we still use the settings under system.web like authentication, caching, compilation, customErrors, httpCookies, sessionState and trace?
- What about the runtime assemblyBindings's? Do we still need these?
- What about HTTP Handlers? In MVC 5, we had to remove the Trace handler in the release build or we got a 500 Internal Server error when navigating to /Trace.axd, instead of 404 Not Found. Do we still need to remove them?
They don't really have the documentation for much of ASP.NET 5 built up, but the instructions for publishing to IIS are fairly clear.
This process generates a very tiny
web.config
for you. For example:Other than that, it looks like the
system.webServer
section will be respected by IIS, including compression and caching.