1

Im trying to add ASP .NET membership security to my Silverlight + WCF application but i keep getting the following exception intermittently:

at System.Security.Permissions.PrincipalPermission.ThrowSecurityException() at System.Security.Permissions.PrincipalPermission.Demand() at System.Security.PermissionSet.DemandNonCAS() at Hp.Esf.Service.EsfService.GetAllUsers() in C:\HP\Trunk with failing Authentication\trunk\Hp.Esf.Service\EsfService.cs:line 227 at SyncInvokeGetAllUsers(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

If I use [InstanceContextMode = InstanceContextMode.PerCall)] everything works as expected but if I change it to InstanceContextMode = InstanceContextMode.Single)] that exception keeps appearing intermittently (Or at least I havent found a pattern of why this is happening)

Does anybody has any idea of why this could be happening?

Francisco
  • 11
  • 2
  • More details required. I assume this happens because when you set the ContextMode Single, the timeout is set to 20 minute by default. Once it times out, you would get the exception... – sajoshi May 04 '11 at 09:39

0 Answers0