2013-04-26 48 views
0

我使用包含簡單SQL精簡版(.sdf文件)數據庫的WebMatrix 2開發了我公司的Web Pages 2網站。聽起來很簡單。在本地開發框中運行完美。上傳到主機的WebMatrix 2網站問題

但是,通過FTP到我的Web主機,這是一個不行。我收到的第一個錯誤是這樣的:


Server Error in '/' Application. 

Unable to find the requested .Net Framework Data Provider. It may not be installed. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. 

Source Error: 


Line 1: @{ 
Line 2:  WebSecurity.InitializeDatabaseConnection("Omniflow", "UserProfile", "UserId", "Email", true); 
Line 3: } 

我已經搜查,搜查,並在網上搜索,試圖找出此問題的根源,以及如何解決它。我還沒有找到答案。我收集比顯然一些需要的程序集/ DLL不會與應用程序上傳。我已經嘗試了FTP和Web Deploy方法,但沒有修復。

這是問題的根源嗎?爲什麼WebMatrix沒有上傳所有的依賴關係?如果不能,爲什麼微軟的在線文獻中沒有任何內容 - 它應該來自微軟 - 或者其他任何人描述這個問題?

回答

0

您是否正在使用Microsoft WebMatrix頁面上列出的託管網站之一:http://www.microsoft.com/web/webmatrix/?我知道,當我將WebMatrix站點部署到通用IIS服務器時,它在bin目錄中需要一些額外的DLL,並且在它工作之前可以對其進行微調。

0

發佈時檢查您是否選擇了數據庫文件(.sdf文件)或不。然後選擇它併發布。 希望它能爲你工作。

0

確保您具有訪問SqlCE數據庫所需的所有SqlCE DLL。 它們應該出現在bin \,bin \ x86 \和bin \ AMD64 \文件夾中。

您可以嘗試使用站點從模板 - >空站點(ASP.NET)創建新站點,並檢查bin文件夾以查看哪些所有dll都存在。

如果您還沒有在您的網站中添加它們,請添加它們。這應該可以解決你的問題。