views:

27

answers:

1

Despite using many sql databases before, I've never actually tried to develop an app with a database in the App_Data directory.

Until now!!

It's a small WCF service project, which has a sql express 2008 r2 database.

Working in VS there are no problems, I thought it would be as easy as deploying to a server (win 2008 with sql 2008 r2 installed) and it would just work. But it would appear not.

In the web.config, the connection string which uses |Data Directory| in the connection string.

I read here that |Data Directory| only works in VS, but looking at other articles on the web that doesn't seem to be the case.

I have (for the sake of this) given everyone modify rights on the app_data dir on the server.

I deployed using the package feature in VS 2010.

Thx S

A: 

This problem was related to the application pool account in IIS not having permissions on the SQL Express instance.

SteveCl