views:

411

answers:

2

If I create a website that uses an mdf in App_Data with the connection string:

Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;

what do I need to do to run the site in a shared hosting environment? Do I need to copy the contents of my mdf to the main SQL Server engine of my host? Is there a way to use the non-SQLExpress engine of my host and still keep my mdf in my App_Data?

+1  A: 

Your webhost should have documentation on this. Gearhost.com is my webhost, and they do.

If your webhost doesn't have documentation on this, email them and then find a new webhost.

George Stocker
+1  A: 

Mdf files will only work with SQL Server engines (Express or the full versions). The provider you use will need to provide access to a SQL Server engine. As Gortok said, a lot depends on the provider. See their documentation for the details.

Matt Spradley