用户“"登录失败.该用户未与受信任的SQL Server连接关联. [英] Login failed for user ''. The user is not associated with a trusted SQL Server connection.

查看:60
本文介绍了用户“"登录失败.该用户未与受信任的SQL Server连接关联.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的名字叫埃德温

我的网站有问题,我无法通过连接字符串登录,但出现错误提示:
================================================== ================
用户;"的登录失败.该用户未与受信任的SQL Server连接关联.

说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的详细信息.
异常详细信息:System.Data.SqlClient.SqlException:用户"的登录失败.该用户未与受信任的SQL Server连接关联.

源错误:
第74行:
第75行:objConnection = New SqlConnection(数据源= myserverip地址,端口;初始目录= Matlatladb;集成安全性= SSPI;用户ID = matlala;密码= m @ t007;")
第76行:objConnection.Open()
================================================== ================

我要求托管我的网站的公司将身份验证从"Windows身份验证模式(Windows身份验证)"更改为混合模式(Windows身份验证和SQL Server身份验证)".
但是他们告诉我,他们不能这样做,因为它会影响其服务器上的其他网站.

我的问题是:是否可以使用Web配置文件解决此问题?

Hi there my Name is Edwin

i having a problem with my website i cannot login via my connection string i get a error say:
==================================================================
Login failed for user ";. The user is not associated with a trusted SQL Server connection.

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 ''''. The user is not associated with a trusted SQL Server connection.

Source Error:
Line 74:
Line 75: objConnection = New SqlConnection("Data Source=myserverip address,port;Initial Catalog=Matlatladb;Integrated Security=SSPI;User ID=matlala;Password=m@t007;")
Line 76: objConnection.Open()
==================================================================

I asked the company that is hosting my website to change the Authentication to "Windows Authentication Mode (Windows Authentication)" to "Mixed Mode (Windows Authentication and SQL Server Authentication)".
but they told me that they cannot do that since the it will affect other websites on their server.

My question is: Is there a way to get around this, using web config file?

推荐答案

1.尝试在 www.connectionstrings.com [ ^ ]

2.尝试连接下一个连接字符串:
数据源= dbserver;初始目录= db;用户ID =某些用户;密码=一些密码;
1. Try to dig out this question at www.connectionstrings.com[^]

2. Try to connect with the next connection string:
Data Source=dbserver;Initial Catalog=db;User ID=some user; Password=some password;


我猜用户ID = matlala;密码= m @ t007;是您的Windows用户ID和密码.

只需将其从连接字符串中删除,然后在您的web.config中以相同用户身份添加模拟.

I guess User ID=matlala;Password=m@t007; is your windows user ID and password.

Just remove it from your connection string, and add impersonation as the same user in your web.config.

<identity impersonate="true" userName="matlala" Password="m@t007">



:-D快乐编码:-D



:-D Happy coding :-D


这篇关于用户“"登录失败.该用户未与受信任的SQL Server连接关联.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆