environmnet : VB.NET (.Net 2.0)
I am trying run a windows application from a Network.
While connecting to SQL Server, I get the following error.
Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
My code
-----------------------------------------------------------
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Security
Imports System.Security.Permissions
'Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim cs As String = "User ID=dev;password=password1;Data
Source=w2ks-gfrdev;Initial Catalog=gfr"
Dim CN As New SqlConnection(cs)
CN.Open()
End Sub
End Class
------------------------------------------------------
Any help will be appreciated.
Same code works in .Net 1.1