m.edmondson
m.edmondson

Reputation: 30922

Create File encountered operating system error 4350 when running MVC Application

I have a vanilla MVC 5 application. When running and logging in I get the following:

CREATE FILE encountered operating system error 4350(This file is currently not available for use on this computer.) while attempting to open or create the physical file '\fsrsvr06pr\users\medmondson\Visual Studio 2015\Projects\Portal\Portal\App_Data\aspnet-Portal-20160805104334.mdf'. CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

The file does exist:

enter image description here

Although the file is on a fileshare, which could possibly have an effect.

So:

Upvotes: 0

Views: 290

Answers (1)

m.edmondson
m.edmondson

Reputation: 30922

It appears I had problems with client side caching, therefore the problem was at the operating system level.

To resolve I formatted the local database with this command:

REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f

then restarted my machine.

The Microsoft Support article relating to this.

Upvotes: 0

Related Questions