码迷,mamicode.com
首页 > 移动开发 > 详细

Login failed for user 'IIS APPPOOL\web2'

时间:2021-06-03 18:29:29      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:failed   windows   check   rom   exp   this   cli   entity   init   

Error:

I am getting following error while openning connection with Database from asp.net application.

[SqlException (0x80131904): Login failed for user ‘IIS APPPOOL\web2‘.]

Here on the database I have windows authentication and connection string in web.config is set accordingly and given below:

Data Source=.;Initial Catalog=<DB Name>;Integrated Security=true;Persist Security Info=False;" providerName="System.Data.SqlClient"

In IIS:

I have a website which is using "web2" and this app pool is running under the identity of "ApplicationPoolIdentity".

Solved solution:

Under SSMS expand the security right click on logins and select "New Login". In the New Login dialog, enter the app pool(IIS APPPOOL\web2) as the login name and click "OK". You can then right click the login for the app pool, select Properties and select "User Mapping". Check the appropriate database, and the appropriate roles.

技术图片

技术图片

 

 



技术图片

 

 
技术图片

 

 



 

Login failed for user 'IIS APPPOOL\web2'

标签:failed   windows   check   rom   exp   this   cli   entity   init   

原文地址:https://www.cnblogs.com/SF8588/p/14845573.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!