views:

294

answers:

1

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

+1  A: 

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.

Brian Reiter
Your answer is better than mine, so I deleted my answer, added its content to your answer, then upvoted you :-)
RoadWarrior