Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将用户名/密码传递给经过身份验证的代理VB.NET-SQL-Simple,但可以';不明白_Sql_Vb.net_Proxy - Fatal编程技术网

将用户名/密码传递给经过身份验证的代理VB.NET-SQL-Simple,但可以';不明白

将用户名/密码传递给经过身份验证的代理VB.NET-SQL-Simple,但可以';不明白,sql,vb.net,proxy,Sql,Vb.net,Proxy,有一个简单的windows窗体应用程序(VS 2013中的VB.net) 一次性连接到SQL数据库以验证激活密钥 非常有效,除非程序安装在需要经过身份验证的代理的计算机上。然后获取“未验证”错误 SQL连接: dbSource = "Initial Catalog=MySQLDatabse;Data Source=123.123.123.123;Persist Security Info=True;User ID=MyUserName;Password=MyPassword" mySQL

有一个简单的windows窗体应用程序(VS 2013中的VB.net)

一次性连接到SQL数据库以验证激活密钥

非常有效,除非程序安装在需要经过身份验证的代理的计算机上。然后获取“未验证”错误

SQL连接:

 dbSource = "Initial Catalog=MySQLDatabse;Data Source=123.123.123.123;Persist Security  Info=True;User ID=MyUserName;Password=MyPassword"

 mySQLConn = New SqlConnection(dbSource)
 mySQLConn.Open()
 mySQLCmd = mySQLConn.CreateCommand
 mySQLCmd.CommandText = "SELECT * FROM Customer WHERE ActKey='1234567'"
 'Rest of Sub Here
寻找了解决办法,空手而来

默认情况下,当用户在客户端计算机上打开web浏览器(如www.stackoverflow.com)时,会弹出代理服务器身份验证并请求用户名和密码

我是否实现WebProxy?有证件吗

我是否需要用户输入凭据才能访问数据库(因为它不是通过HTTP),或者我可以只使用app.config文件中的默认凭据:

  <system.net>
    <defaultProxy useDefaultCredentials="true" />
  </system.net>


提前谢谢。

我已经在app.config文件中这样做了

 <system.net>
    <settings>
        <ipv6 enabled="true" />
    </settings>
    <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy bypassonlocal="True" proxyaddress="http://yourproxy"/>
    </defaultProxy>
 </system.net>