Hello team,
i'm new in the asp.net core 6. i have developed UI project in the asp.net core 6 framework. but when i go to publish that project on the IIS its giving me the web.config file error as attatched in the image. how to configure the web.config file in the asp.net core 6 ?
please help me to resolve this issue....
thanks in advance...


Anandu G NathPosted Dec 27, 2023, 3:57 AM
@Bhavesh Vankar
Refer the below link
https://www.c-sharpcorner.com/article/how-to-deploy-and-publish-a-net-7-app-in-iis/
Bhavesh VankarPosted Dec 25, 2023, 7:08 AM
Actually i have published the asp.net core 6 application using visual studio 2022. When i created this project by VS 2022 at that time the web.config file is not available in the project. But after published my project using VS 2022 Solution Explorer. The web.config file is generated in the published code with default settings. but having big question is for me which settings will be in side the web.config file after publish the project. which will help to application to run on the IIS.
Kindly help me with an example.
Thanks.
Bhavesh VankarPosted Dec 24, 2023, 1:00 PM
Having big confusion whenever i try to browse my hosted application of .net core 6 its display below error. i'm unable to understand by this happen, Is there required Web.Config file after publish the project ?
please guide me, refered all the mentioned article. but still big confustion. i published UI project which is created in Asp.Net Core 6. (taken project Model, View, Controller).
Jignesh KumarPosted Dec 18, 2023, 4:26 AM
Hello Bhavesh,
Please refer to this thread which will help you out,
https://www.c-sharpcorner.com/article/host-and-publish-net-core-6-web-api-application-on-iis-server2/
https://stackify.com/how-to-deploy-asp-net-core-to-iis/
Sam HobbsPosted Dec 16, 2023, 8:58 PM
I see that the
webconfigfile that it is complaining about is in a directory inC:\inetpub\wwwroot. For security reasons, most developers do not put websites there, at least not for development. Is that where your website is at? Perhaps you can post thewebconfigfile.How did you deploy the website? Did you use Publish for the project in the Solution Explorer?
Does the website work when you execute using Visual Studio? Is it an ASP.Net Core application? They have a server, called Kestrel, built into them. VS uses Kestrel when it executes an ASP.Net Core application.
Satyaprakash SamantarayPosted Dec 16, 2023, 6:49 PM
Hi,
Refer the below link. It works for me.
https://www.c-sharpcorner.com/article/host-and-publish-net-core-6-web-api-application-on-iis-server2/