SA用户vb.net的登录失败,但适用于asp.net [英] Login Failure for SA user vb.net but works on asp.net

查看:155
本文介绍了SA用户vb.net的登录失败,但适用于asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我有点奇怪的问题。我有一个aspx页面,我的下拉列表连接到数据库以填充下拉框。

这工作正常但是当我运行我的vb.net插入命令时,我的登录失败,因为用户''没有关联可信的SQL服务器连接。两者都使用相同的连接细节。



hi i got a bit of a strange problem. i have an aspx page where my dropdown connects to the database to populate the dropdown box.
this works fine but when i run my vb.net insert command i get login failed for user ' ' not associated with a trusted SQL server connection. both use the same connection details.

Dim connections As String = "Server=INTR\SQLEXPRESS;Initial Catalog=CREDIT_REJECT;Persist Security Info=True;User ID=sa;Password=HoyaHill11;"
        Dim mycon As New SqlConnection(connections)

        mycon.Open()





i已经检查过,sa用户是sysadmin所以它应该有写权限。

i不是确定还有什么可以检查,因为这非常令人困惑。任何帮助将不胜感激



i have checked and the sa user is sysadmin so it should have write permissions.
i am not sure what else to check as this is very confusing. any assistance will be appreciated

推荐答案

尝试使用Visual Studio内置服务器资源管理器连接您的SQL服务器。如果已连接,则复制该连接字符串(使用其属性)并在代码中使用它。



问候,

Bluesathish
Try to connect your SQL server using Visual studio inbuilt server explorer. If its connected, then copy that connection string (using its property) and use it in your code.

Regards,
Bluesathish


只需尝试integrated security = true而不是用户名和密码
Just Try "integrated security=true" instead of Username & Password


这篇关于SA用户vb.net的登录失败,但适用于asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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