471,570 Members | 935 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

Novice: SecurityException on TableAdapter.Fill()?

Hello,

Thanks for reviewing my question. This is my first program with the new VS
2005 and I created a simple dialog with a datagrid connected to a new
database I created with VS as well.

this.sampleTableAdapter.Fill(this.sampleDataSet1.T eams);

Error Message:

System.Security.SecurityException was unhandled
Message="Request for the permission of type
'System.Data.SqlClient.SqlClientPermission

I clicked on the Action option to add the permission to my project and
restarted the debugging session but I still get the same error.

How do I solve this?

Many Thanks
Peter
Jan 19 '06 #1
2 1627
Follow up,

My project is on a network drive and when I start VS it says that the
project location is not trusted.

Peter
Jan 19 '06 #2
Hello Peter,

..NET has a security system called "Code Access Security" and that is what's
stopping you. All applications get a set of persmissions based on where it
executes from (and some other possible criterias). Your application has not
gotten this persmission.

Are you executing it from a shared folder on your network perhaps?

You can read more about CAS here: http://www.codeguru.com/csharp/cshar...cle.php/c9253/
--
Patrik Löwendahl [C# MVP]
http://www.lowendahl.net
Hello,

Thanks for reviewing my question. This is my first program with the
new VS 2005 and I created a simple dialog with a datagrid connected to
a new database I created with VS as well.

this.sampleTableAdapter.Fill(this.sampleDataSet1.T eams);

Error Message:

System.Security.SecurityException was unhandled
Message="Request for the permission of type
'System.Data.SqlClient.SqlClientPermission
I clicked on the Action option to add the permission to my project and
restarted the debugging session but I still get the same error.

How do I solve this?

Many Thanks
Peter


Jan 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Programatix | last post: by
reply views Thread by Harry Leboeuf | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.