IIS7 DNN Database Error Connection

So, I am moving the DNN7 site from my local computer (the site was developed in WebMatrix) to a server running Windows Server 2008.

When I start the site, I get an error message. "Error connecting DNN to database failed."

Now it’s strange that I downloaded Webmatrix on the 2008 server and got the site to work fine, but it does not work from IIS.

Why does this work for Webmatrix but not IIS?

Edit: my connection string:

<add name="SiteSqlServer" connectionString="Server=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Database=DNN2;Trusted_Connection=Yes;" providerName="System.Data.SqlClient" />

Any thoughts why this connection string is not working?

I keep getting "Could not connect to database.

thanks

James

+4
source share
1

, , SiteSqlServer web.config. , . <connectionStrings>, <appSettings>

      <connectionStrings>
        <add name="SiteSqlServer" connectionString="Server=myServerName;Database=myDataBase;User Id=myUsername;
Password=myPassword;" providerName="System.Data.SqlClient" />
      </connectionStrings>

      <appSettings>
        <add key="SiteSqlServer" value="Server=myServerName;Database=myDataBase;User Id=myUsername;Password=myPassword;" />
      </appSettings>

,

+3

All Articles