datadirectory incorrect in nested application
I have used the |DataDirectory| value in a connection string in web.config. It works fine on my local machine.

However it fails when the site is uploaded. The uploaded version of my site is a sub-directory / sub-application of another site. The |datadirectory| value does not reference my App_Data folder, but a folder on the hosting computer.

Is there a way around this? I want to avoid having 2 different web.config files. 


datadirectory incorrect in nested application
===

I have used the |DataDirectory| value in a connection string in web.config. It works fine on my local machine.

However it fails when the site is uploaded. The uploaded version of my site is a sub-directory / sub-application of another site. The |datadirectory| value does not reference my App_Data folder, but a folder on the hosting computer.

Is there a way around this? I want to avoid having 2 different web.config files. 

