我使用SQL在asp中创建了一个Web应用程序.我在web.config中提到了ConnectionString,如下所示:
Hi, I have created a web application in asp with SQL.I have mentioned ConnectionString in web.config as follows:
<connectionStrings> <add name="xyzConnectionString" connectionString="Data Source=.\SQLEXPRESS; Initial Catalog=XYZ;Integrated Security=True;Trusted_Connection=No" providerName="System.Data.SqlClient"/> </connectionStrings>但是,当我在Parallels Plesk Panel Dedicated服务器上上传此Web应用程序并与数据库连接时,出现如下错误:: "/"应用程序中的服务器错误. 用户"的登录失败. 说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的详细信息. 异常详细信息:System.Data.SqlClient.SqlException:用户"的登录失败. 请帮帮我. 预先感谢.
But when i am uploading this webapplication on Parallels Plesk Panel Dedicated server and connect with database then i am getting an error as follows:: Server Error in ''/'' Application. Login failed for user ''''. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''''. Please help me. Thanks in advance.
推荐答案如下更改连接字符串 Hi, Change your connection string as below Data Source=.\SQLEXPRESS; Initial Catalog=XYZ;User ID=personal; Integrated Security=SSPI;Persist Security Info=False;
您可能会发现这些资源很有用 blogs.msdn/b/sql_protocols/archive/2008/05/03/understanding-the-error-message-login-对于用户而言,用户未与可信SQL Server-connection.aspx相关联 [ ^ ] geekswithblogs/ranganh/archive/2005/05/25/40489.aspx [^ ]
you may find these resources useful blogs.msdn/b/sql_protocols/archive/2008/05/03/understanding-the-error-message-login-failed-for-user-the-user-is-not-associated-with-a-trusted-sql-server-connection.aspx[^] geekswithblogs/ranganh/archive/2005/05/25/40489.aspx[^]
将 Trusted_Connection=No
更改为
Trusted_Connection=Yes
放置Trusted_Connection =在连接字符串中为是. Put Trusted_Connection=Yes in connection string.
更多推荐
服务器上的连接字符串问题
发布评论