我已经为此苦苦挣扎了两天,没有找到更接近的解决方案。我已经读过20-30个线程,而stil无法解决此问题。
请帮帮我。
我禁用了匿名身份验证,启用了asp.net模拟。
我添加了<identity impersonate = "true" />
我已将一个用户添加到连接到我尝试连接的数据库的安全登录名中
这是我使用的连接字符串:
Data Source=IPTOSERVER;Initial Catalog=Phaeton;User Id=User;Password=Password;
错误信息:
Cannot open database "Phaeton.mdf" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
最佳答案
您收到的错误消息告诉您应用程序无法连接到sqlexpress db,而不是SQL Server。
我将只更改sql server中数据库的名称,然后相应地更新connectionstring并重试。
您的错误消息指出以下内容:
Cannot open database "Phaeton.mdf" requested by the login. The login failed.
在我看来,您仍在尝试连接到基于文件的数据库,名称“Phaeton.mdf”与新的sql数据库名称“Phaeton”不匹配。
希望这可以帮助。
关于asp.net - 用户 'NT AUTHORITY\NETWORK SERVICE'登录失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2251839/