I ran a sample .NET application trying to open a snowflakedbconnection, which worked with no issues. But the same function used in the production application (hosted in the organization's server) fails with an exception "a task was canceled" while trying to open a connection. I assume it could possibly be a proxy issue. Can anyone throw some guidance here.
private void button1_Click(object sender, EventArgs e)
{
var conn = new SnowflakeDbConnection();
conn.ConnectionString = "scheme=https;host=XXXXX.snowflakecomputing.com;account=XXXXX;role=dbrole;db=dbname;schema=dbschema;warehouse=dbwarehouse;user=dbuser;password=dbpassword;";
conn.Open();
}
Try adding the following to your ConnectionString.
;useProxy=true;proxyHost={http://yourproxy};proxyPort={8080};proxyUser={user};proxyPassword={password};
e.g. your ConnectionString:
"scheme=https;host=XXXXX.snowflakecomputing.com;account=XXXXX;role=dbrole;db=dbname;schema=dbschema;warehouse=dbwarehouse;user=dbuser;password=dbpassword;useProxy=true;proxyHost=myproxy.organisation.name;proxyPort=8080;proxyUser=proxyuser;proxyPassword=proxypassword;"
I found this searching through the repo for 'proxy'. I ended up finding detailed implementations in the folder 'Snowflake.Data.Tests/SFConnectionIT.cs'