简体   繁体   English

无法打开登录请求的数据库“test”。 登录失败。 用户 'Domain\\userid' 登录失败

[英]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.

相关问题 无法打开登录请求的数据库“MyBase”。 登录失败。 用户“域\用户”登录失败 - Cannot open database "MyBase" requested by the login. The login failed. Login failed for user 'domain\User' 无法打开登录请求的数据库“Test”。 登录失败。 用户&#39;sa&#39;登录失败 - Cannot open database “Test” requested by the login. The login failed. Login failed for user 'sa' 无法打开登录请求的数据库“测试”。 登录失败。 用户 &#39;xyz\ASPNET&#39; 登录失败 - Cannot open database "test" requested by the login. The login failed. Login failed for user 'xyz\ASPNET' 无法打开登录请求的数据库“ [数据库]”。 登录失败。 用户“ [User]”的登录失败 - Cannot open database “[Database]” requested by the login. The login failed. Login failed for user '[User]" 无法打开登录请求的数据库“身份”。 登录失败。 用户“DESKTOP\User”登录失败 - Cannot open database “Identity” requested by the login. The login failed. Login failed for user 'DESKTOP\User' 无法打开登录请求的数据库“”。 登录失败。 用户“ sa”的登录失败 - Cannot open database “” requested by the login. The login failed. Login failed for user 'sa' 无法打开登录请求的数据库“databaseName”。登录失败。用户登录失败 - Cannot open database “databaseName" requested by the login. The login failed. Login failed for user 无法打开登录请求的数据库“ dbTest”。 登录失败。 用户“ testUser”的登录失败 - Cannot open database 'dbTest' requested by the login. The login failed. Login failed for user 'testUser' 无法打开登录请求的数据库“ Inventory_New”。 登录失败。 用户“ sa”的登录失败 - Cannot open database “Inventory_New” requested by the login. The login failed. Login failed for user 'sa' 无法打开登录请求的数据库“ ASPState”。 登录失败。 用户“ xxxx”的登录失败 - Cannot open database “ASPState” requested by the login. The login failed. Login failed for user 'xxxx'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM