I'm trying to work on a local development copy of a website in Visual Studio 2017. This website uses a SQL CE database in an .MDF file, and I run the site locally through VS using IIS Express.
When I try to start or restart the site, I keep getting errors from the site's CMS that it cannot connect to the database. (The CMS is Umbraco, but I don't think the issue is CMS-related.) I thought that this was because some process is not releasing its hooks on the file, but the problem even persists after a full computer restart sometimes, so I'm not so sure anymore.
The site starts up just fine sometimes (without any DB-related changes being made), and there are no visible problems once it starts up. It's hard to predict when it will or won't work.
Below is a list of what I have tried, along with the typical result:
- Restarting the site normally: Usually gives connection error
- Ending the IIS Express process manually, and restarting Visual Studio: Usually gives connection error
- Restarting the computer: Works more often, but not always
- Various apps to manually release file hooks: Have not been able to get any of these to work properly
Does anyone have any suggestions? Thanks.