2013-04-25 63 views
0

我開發了一個網站,並在我的網站上有兩個數據庫。 我在plesk面板中創建了兩個數據庫和用戶並上傳備份, 數據庫的名字是database_Journal,數據庫名稱2是database_General,用戶也是UserID1和UserID。 但是有一些東西錯了它,它給了我這個錯誤:asp.net中兩個數據庫的網頁配置錯誤

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

我的web配置是這樣的:

<add name="dbconn" connectionString="Password==******;; Persist Security Info=True;User ID=UserID1; Initial Catalog=database_General; Data Source=***.**.**.**" providerName="System.Data.SqlClient" /> 

    <remove name="LocalSqlServer"/> 

    <add name="LocalSqlServer" connectionString="Password=******;Persist Security Info=True;User ID=UserID1; Initial Catalog=database_General; Data Source=***.**.**.**" providerName="System.Data.SqlClient" /> 

    <add name="dbconn_general" connectionString="Password==******;; Persist Security Info=True;User ID=UserID; Initial Catalog=database_Journal; Data Source=***.**.**.**" providerName="System.Data.SqlClient" /> 

回答

0

試試這個格式...

<add name="dbconn" connectionString="server=YourServerNameOrServerIpAddress; database=database_General; uid=UserID1; Password=******" providerName="System.Data.SqlClient" />