System.AccessViolationException in .NET 4.0 while connecting to SQL Database
问题 I have created following code Dim ConnectionString As String = ConfigurationManager.ConnectionStrings("default").ConnectionString Dim con As New SqlConnection(ConnectionString) con.Open() Response.Write("Connection Opened<br/>") con.Close() Response.Write("Connection Closed<br/>") in a web application project Target .NET Framework 4.0 but it is giving System.AccessViolationException i cannot understand why. if i change the target Framework to .NET 3.0 then the code runs fine. Below is the