[英]Cannot open database "test" requested by the login. The login failed. Login failed for user 'Domain\userid'
I have website hosted in IIS with application pool identity set to 'Local systems'.我的网站托管在 IIS 中,应用程序池标识设置为“本地系统”。
Windows authentication - Enabled Windows 身份验证 - 已启用
ASP .net Impersonation - Enabled ASP .net 模拟 - 已启用
all other are disabled所有其他人都被禁用
ASP.net impersonation identity set to Authenticated user. ASP.net 模拟身份设置为经过身份验证的用户。
I am getting error:我收到错误:
Cannot open database "test" requested by the login.
无法打开登录请求的数据库“test”。 The login failed.
登录失败。 Login failed for user 'PRD\\12345'.
用户“PRD\\12345”登录失败。
<add name="testConnectionString"
connectionString="Data Source=testserver;Initial Catalog=test;Integrated Security=True"
providerName="System.Data.SqlClient" />
This is my connection string这是我的连接字符串
Have you also created a User in the database mapped to the login?您是否还在数据库中创建了一个映射到登录名的用户? If the login has not been at a minimum granted the CONNECT DATABASE permissions then it will not be able to connect when a specific database is included in the connection string
如果登录名未至少被授予 CONNECT DATABASE 权限,则当连接字符串中包含特定数据库时,它将无法连接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.