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...



Jignesh KumarRank #91 · 22.9K reputationPosted Dec 17, 2023, 11:26 PM EST
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/
Satyaprakash SamantarayRank #101 · 21.1K reputationPosted Dec 16, 2023, 1:49 PM EST
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/
Sam HobbsRank #107 · 20.5K reputationPosted Dec 16, 2023, 3:58 PM EST
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.
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Dec 24, 2023, 8:00 AM EST
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).
Bhavesh VankarRank #1,147 · 1.6K reputationPosted Dec 25, 2023, 2:08 AM EST
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.
Anandu G NathRank #681 · 3.5K reputationPosted Dec 26, 2023, 10:57 PM EST
@Bhavesh Vankar
Refer the below link
https://www.c-sharpcorner.com/article/how-to-deploy-and-publish-a-net-7-app-in-iis/