Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ internal SqlConnectionString(SqlConnectionString connectionOptions, string dataS
_attestationProtocol = connectionOptions._attestationProtocol;
_serverSPN = connectionOptions._serverSPN;
_failoverPartnerSPN = connectionOptions._failoverPartnerSPN;
_hostNameInCertificate = connectionOptions._hostNameInCertificate;
#if NETFRAMEWORK
_connectionReset = connectionOptions._connectionReset;
_contextConnection = connectionOptions._contextConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,15 @@ public void Open_ConnectionString_Whitespace()
Assert.NotNull(ex.Message);
}

[Fact]
public void Open_ConnectionString_UserInstance()
{
SqlConnection cn = new SqlConnection("User Instance=true;");
SqlException ex = Assert.Throws<SqlException>(() => cn.Open());
// Throws without access violation
Assert.NotNull(ex.Message);
}

[Fact]
public void ServerVersion_Connection_Closed()
{
Expand Down