Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web.config missing when creating ASP.NET Core Web App in VS 2017 RC?

I've noted that when creating a new ASP.NET Core Web App in Visual Studio 2017 RC, a web.config file is not created. My understanding was that this file contains important code to facilitate IIS integration, something that I am interested in, as I would like to run this application on IIS.

Is this a bug, or have I missed a step in the process?

like image 965
toolshed Avatar asked Mar 01 '17 21:03

toolshed


People also ask

Can we add web config in ASP.NET Core?

The web. config file has also been replaced in ASP.NET Core. Configuration itself can now be configured, as part of the application startup procedure described in Startup.

Where is the web config file in ASP.NET Core?

config file location. In order to set up the ASP.NET Core Module correctly, the web. config file must be present at the content root path (typically the app base path) of the deployed app. This is the same location as the website physical path provided to IIS.


2 Answers

In Visual Studio 2017, right click in Project in Solution Explorer -> Add -> New Item -> Search for "config" -> Add Web Configuration File. This will add web.config in your project with default stuff.

enter image description here

like image 70
Meet Shah Avatar answered Oct 03 '22 09:10

Meet Shah


For Asp.Net Core 2.0, and you still need to have web.config you can add a Web configuration item template. You can use that like change the max file upload limit etc.

The web.config file is generated when you are publishing the project.

like image 39
Freeubi Avatar answered Oct 03 '22 10:10

Freeubi