简体   繁体   中英

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

I have an asp.net mvc web application, and it used to connect well to the sql server when running it from Visual studio (on debug mode) . but after i have deployed it to IIS 7 using windows authntication, i am getting the following error:-

 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.

Can anyone adive , what is causing this error ?

Thnaks

检查应用程序池标识。如果是这种情况,则应用程序池用户需要在Sql Server中具有适当的权限。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM