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

前端 未结 3 743
醉酒成梦
醉酒成梦 2020-12-11 16:05

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.

相关标签:
3条回答
  • 2020-12-11 16:42

    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).

    0 讨论(0)
  • 2020-12-11 16:58

    Try switching to full trust application.

    enter image description here

    0 讨论(0)
  • 2020-12-11 17:00

    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 讨论(0)
提交回复
热议问题