簡體   English   中英

將我的asp.net MVC Web應用程序部署到IIS7后,無法將其連接到SQL Server

[英]Unable to connect my asp.net mvc web application to the sql server after deploying it to IIS7

我有一個asp.net mvc Web應用程序,當從Visual Studio(在調試模式下)運行它時,它可以很好地連接到sql服務器。 但是使用Windows身份驗證將其部署到IIS 7之后,出現以下錯誤:-

 Login failed for user '<ourDomainName>\<ourServerName>$'.
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: Login failed for user '<ourDomainName>\<ourServerName>$'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

誰能接受,這是什么原因導致此錯誤?

惡作劇

檢查應用程序池標識。如果是這種情況,則應用程序池用戶需要在Sql Server中具有適當的權限。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM