您好我剛剛嘗試在IIS上第一次運行我的應用程序fopr。 一切工作的發現,而在Visual Studio中開發,但是當我加入了應用IIS我得到這個錯誤:無法打開數據庫錯誤從IIS
Cannot open user default database. Login failed.
Login failed for user 'IIS APPPOOL\forum'.
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.Data.SqlClient.SqlException: Cannot open user default database.
我應該怎麼做,當我從Visual Studio運行它的網站的作品?
編輯
我做了一個痘痘更挖我設法找到了我需要setmy應用程序池標識網絡服務我這樣做,但現在我得到了另一個錯誤:
Unable to open the physical file "D:\Projects IDE\Visual Studio\MyWork\Websites\Forum\App_Data\ASPNETDB.MDF". Operating system error 5: "5(Access is denied.)". An attempt to attach an auto-named database for file D:\Projects IDE\Visual Studio\MyWork\Websites\Forum\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
用於連接數據庫的連接字符串是什麼?如果嘗試通過在Project |中選擇IIS來運行該應用程序,該怎麼辦?屬性|網? – Igor