Hi I've developed a web application using Xbap. The application runs in partial trust and accesses a database using LINQ/.Net Data Services. I get the following error (abbr.) whenever LINQ tries to access the database... System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.ReflectionPermission The first permission that failed was: <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RestrictedMemberAccess"/> The demand was for: <PermissionSet class="System.Security.PermissionSet" version="1"> I read somewhere that this may have something to do with the permission levels on the server. I increased the permission to full access on IIS but still get the error. Any clues? Thanks
Hi, Not sure but I think I've seen where this may be called from some but not all ASP.NET folders. Have you experimented with running everything from different folders? (I'm just shooting in the dark here, just a tip.) All the best, Mark
you need to switch to use full trust; reflection needs full trust. I assumed you are hosting on IIS 7.0. By default, IIS 7.0 is configured to use medium trust BUT you can override it in your web.config. see http://support.discountasp.net/KB/a401/changing-the-default-aspnet-trust-level.aspx