MVC Code First: App_Data Folder Not Being Created
Asked Answered
H

1

1

I'm using the MVC Code First approach to create a SQL Compact database (from WebConfig: data source=|DataDirectory|MailBoxDB.sdf). The .sdf file should get created automatically, and it does if I manually create the App_Data folder on the web server (Windows Server 2008). However, I'm trying to automate the deployment process and I want to eliminate this manual step. I'm using MSDeploy to create the deployment package. Is it a permissions issue that prevents IIS (7.5) from creating the App_Data folder on its own? If so, which settings should I be focusing on? Any ideas?

Hutchings answered 14/8, 2011 at 21:35 Comment(0)
A
1

I had a similar scenario (generally more complex, although without a database in App_Data). I pieced together several SO questions and found a solution which I've posted on my question on the same topic. Take a look at my answer and hopefully it helps.

Accelerator answered 20/1, 2012 at 6:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.