服务器上的连接字符串问题

编程入门 行业动态 更新时间:2024-10-23 12:25:43
本文介绍了服务器上的连接字符串问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用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.

更多推荐

服务器上的连接字符串问题

本文发布于:2023-10-30 22:44:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544214.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   器上

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!