IIS Connection string error

Trying to figure out the correct connection string for a sql server express db. Trying to publish my app to IIS and test before publishing to my hosting site.

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

I started here and also used connectionstrings.com. I also started reading the deploy asp.net app using sql compact article here

Using this connection string Data Source=.\SQLExpress;AttachDbFilename=H:\DB\Guestbook.sdf;Integrated Security=True
I get the above error

This connection string

Throws a trust level error. Ive changed to medium and full and still get one of the two errors.

I've tried a variation of a few different strings with no luck.

0 answers