Joaquim  Correia

Joaquim Correia

  • NA
  • 9
  • 23.3k

Request for the permission of type 'System.Data.SQLClientPermission'...

Feb 21 2008 10:23 AM

Hello all,

I've a C# application connecting to a SQL Server 2005 DataBase and it all works well in development ambient. I'm developing with Visual Studio 2005 and i can connect to the DataBase with no problem.

The problem is: when i try to run the application directly from the exe file, every time there is a connection to the same database (and with exactly the same connection string) that i connected with no problem in development ambient, i get the following error: "Request for the permission of type 'System.Data.SQLClientPermission, System.Data, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089' failed.

Why? If i can do it in Visual Studio, and in if i can connect to the DataBase with no problem with SQL Server Managment Studio?

 

TIA,

Joaquim


Answers (2)