Sam Hobbs

Sam Hobbs

  • 53
  • 29.3k
  • 2.1m

Configure IIS for SQLite in ASP.Net Core

Nov 12 2022 1:34 AM

I have an ASP.Net Core website I have been using locally for just myself in my local IIS in Windows 10. It has a CRUD application that uses SQLite that worked in it.

I have a new computer with Windows 11. I copied the project to the new system and built the website. I configured it in IIS and the website works in IIS except the CRUD application cannot open the database. The CRUD application (database) works if I use dotnet run for the website project.The application pool for the website has:

  • .Net CLR version: No Managed Code
  • Managed pipeline mode: Integrated

I am getting the error:

> SqliteException: SQLite Error 14: 'unable to open database file'.

What do I need to do so IIS can open the database?

 


Answers (3)