0

I've created an mvc application. I used entity framework to work with database. When I tested my application, I filled my database with some data through web interface of my application. When I deploy app on IIS server and copy .sdf file to deployed app's folder I get the error:

Access to the database file is not allowed. [ 1914,File name = C:\last_project\published\App_Data\Data.sdf,SeCreateFile ]

How I can get working database in my deployed app?

2 Answers 2

1

YOU have to go to the folder where your database is is typically in the app folder but you might check the exact location click on folder click on properties and security and add new user the user should be typically something like this IIS_IUSRS and give the user read and write permission in another words the error you get is because the user iis have no permission to the folder .

Sign up to request clarification or add additional context in comments.

Comments

1

Sounds like a permissions problem. Have you ensured that the database file can be written to by the IIS user? (I'm pretty sure it's no in most cases)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.