0

Click Once deplyment.

Application runs fine in VS2008.

When running the deployed app throws exception on: WindowsIdentity.GetCurrent()

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Click Once security settings: full-trust application.

Any ideas?

thanks, BP

Fredrik Mörk
  • 155,851
  • 29
  • 291
  • 343
theBruce
  • 257
  • 3
  • 16

1 Answers1

1

One way is to specify that every end-user has to have a deployment zone policy that allows SecurityPermissionFlag.ControlPrincipal.

Another way is simply to request this specific permission for your application during deployment. If the end-user agrees, the permission will be granted.

Alternatively you can go the whole hog and request FullTrust for your application during deployment.

HTTP 410
  • 17,300
  • 12
  • 76
  • 127
Brian Reiter
  • 1,339
  • 1
  • 10
  • 16
  • Your answer is better than mine, so I deleted my answer, added its content to your answer, then upvoted you :-) – HTTP 410 Jul 09 '09 at 13:42