[英]Classic ASP Microsoft SQL Server Native Client 11.0 error '80040e14' Login failed for user, but not the one I specified
Getting a very odd error that I can't seem to track down. 收到一个我似乎无法追踪的非常奇怪的错误。 Running Classic ASP on IIS10. 在IIS10上运行经典ASP。 I'm specifying a user in my connection string, but the application seems to be "defaulting" to another user. 我在连接字符串中指定了一个用户,但是该应用程序似乎在“默认”另一个用户。 I can't figure out where this user is being specified. 我不知道指定该用户的位置。
set conn = Server.CreateObject("ADODB.Connection")
connectionString = "Provider=SQLNCLI11;Data Source=serverxy;Initial Catalog=hazard;USER Id=xxxxx;PASSWORD=yyyyy;"
conn.Open connectionString
...do sql queries, etc...
This happens on both my production server, development server and my development desktop machine. 这在我的生产服务器,开发服务器和开发台式机上都发生。
SQL Profiler helped me figure out how to fix the problem. SQL Profiler帮助我弄清楚了如何解决该问题。 It showed that the user I was specifying was actually working. 它表明我指定的用户实际上正在工作。 There was a view calling a query on another server. 有一个视图在另一台服务器上调用查询。 The database on this server was actually offline and had been moved. 该服务器上的数据库实际上处于脱机状态,并且已被移动。 I updated the view to use the new server and all worked after. 我更新了视图以使用新服务器,并且所有工作均已完成。 Completely forgot about Profiler as it's been ages since I've had to use it. 自从我不得不使用Profiler以来,它已经完全忘记了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.