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?

Sam HobbsPosted Nov 20, 2022, 5:53 AM
I finally found the problem and solution. I just had to add to write permission for the Data directory for the IIS_IUSRS account; the directory containing the sqlite database. I know I looked at the permissions and I somehow overlooked that one.
Sam HobbsPosted Nov 16, 2022, 7:57 PM
That Stackoverflow question is about creating the database. For me the database exists and is found when I test the website using VS or just Kestrel from dotnet run. Therefore it must be something in IIS. I assume that since it works without IIS it is not a permission problem.
Aravind GovindarajPosted Nov 15, 2022, 2:27 PM
Can you check is this works for you
https://stackoverflow.com/questions/44232390/sqlite-error-14-unable-to-open-database-file-with-ef-core-code-first