2015-04-20 36 views
0

我已經使用EPiServer v8.0安裝了一個新的空白站點。該網站是使用以管理員身份運行的Visual Studio擴展程序創建的。當我運行的網站,我得到一個數據庫連接錯誤:在新安裝的EPiServer中無法連接數據庫

"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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: unable to create the SQL Server process. 

)」

我從web.config中的連接字符串,像這樣:

<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|EPiServerDB_1293efd2.mdf;Initial Catalog=EPiServerDB_1293efd2;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> 

我已經安裝了鋁合金方網站並且這個工作正常。Alloy的連接字符串與我的空白站點相同,除了數據庫名稱。

我的事件查看器中有很多這些錯誤ap摺疊日誌從SQLLocalDB:

Windows API call CreateProcessAsUserW returned error code: 740. Windows system error message is: The requested operation requires elevation. 
Reported at line: 3705. 
+0

現在我的合金網站也停止工作了,同樣的錯誤。 –

回答

0

確保您可以使用Windows身份驗證通過Management Studio連接到數據庫(如你有集成安全性=在連接字符串中真)。

如果不是,您是否安裝了LocalDB?

接下來,確保Web應用上下文的用戶能夠訪問數據庫;如果您正在運行IIS Express,則這將是您用來啓動Visual Studio的帳戶。

如果您正在運行全面的IIS,它將成爲應用程序池的帳戶。

0

問題原來是LocalDB。我的LocalDB已停止運行,因此當我安裝空的EPiServer站點時,數據庫設置不正確。奇怪的是,安裝程序沒有返回任何錯誤。

這是一個反覆出現的問題,我還沒有到底。 LocalDB一直停止,但我不知道爲什麼。