开发者

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0

I have a WPF web app and I"m trying to access a SQL 2000 database, but I'm getting the following error:

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Any idea how I c开发者_StackOverflowan fix this? I probably need an example as I'm new to this and this is my first WPF application.


Try switching to full trust application.

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0


Your application lacks the necessary permissions to connect to the SQL database. Try running it as an administrator (it may be easiest to simply launch Visual Studio as admin).


Full trust + Enable ClickOnce Security Settings make code conect server again.

Curious this PublicKeyToken=b77a5c561934e089', I thoug was the signing my applications, seems MS uses for a generic security setting

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜