T
Tony
Hello!
Here I have some code that use SqlClientPermission.
I hope that somebody can explain how the code lines marked with 1 can can
have any effect on the code lines marked with 2.
How can these two lines
SqlConnection con = new SqlConnection(@"Data Source=localhost; Initial
Catalog=Pubs;Integrated Security=True;");
con.Open();
have any knowledge of the codelines marked with 1.
protected void Page_Load(object sender, EventArgs e)
{
1 SqlClientPermission perm = new
SqlClientPermission(PermissionState.None);
1 perm.Add(@"Data Source=localhost; Initial
Catalog=Northwind;Integrated Security=True;",
1 null,KeyRestrictionBehavior.AllowOnly);
1 perm.PermitOnly();
2 SqlConnection con = new SqlConnection(@"Data Source=localhost;
Initial Catalog=Pubs;Integrated Security=True;");
2 con.Open();
}
//Tony
Here I have some code that use SqlClientPermission.
I hope that somebody can explain how the code lines marked with 1 can can
have any effect on the code lines marked with 2.
How can these two lines
SqlConnection con = new SqlConnection(@"Data Source=localhost; Initial
Catalog=Pubs;Integrated Security=True;");
con.Open();
have any knowledge of the codelines marked with 1.
protected void Page_Load(object sender, EventArgs e)
{
1 SqlClientPermission perm = new
SqlClientPermission(PermissionState.None);
1 perm.Add(@"Data Source=localhost; Initial
Catalog=Northwind;Integrated Security=True;",
1 null,KeyRestrictionBehavior.AllowOnly);
1 perm.PermitOnly();
2 SqlConnection con = new SqlConnection(@"Data Source=localhost;
Initial Catalog=Pubs;Integrated Security=True;");
2 con.Open();
}
//Tony