How to publish asp.net core application to iis?

Arun Khatri 41 Reputation points
2022-01-31T07:32:34.103+00:00

Sir, It has been more than a month since finding a help article explaining how to publish an asp.net core application having a database to IIS. I have extensively worked with ASP.NET MVC and am quite familiar with VS publishing features. But, when it comes to the core, I am unable to understand in which directory database files get saved or whether VS altogether saves the database or not after publishing. The file structure of the published application is well organised in asp.net MVC but the core published folder gets dumped with dlls making it difficult to manage. For example, in ASP.NET MVC replacing the .cshtml file in a view folder was possible which makes it easy to manage the site but the same is not possible with the ore. Therefore, please help me understand how to publish asp.net core application that has a database to iis.

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 81,976 Reputation points Volunteer Moderator
    2022-01-31T16:57:33.073+00:00

    asp.net core is precompiled, so it is only dll's and the wwwroot folder. earlier version used a more complex folder structure, but it was simplified.

    unless you are using a localdb, there are no database files. if you use a localdb its in the publish root. sqlite is the typical local db and the database file is named app.db

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.