code_junkie

Limiting access to a WCF REST (webHttpBinding) Service using the ASP.NET Membership Provider

Nov 13th, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. [QueryInterceptor("foo_entity")]
  2. public Expression<Func<foo_entity, bool>> FilterMembership()
  3. {
  4. MembershipUser user = Membership.GetUser();
  5. Guid userGuid = (Guid)user.ProviderUserKey;
  6. return c => c.UserId == userGuid;
  7. }
Add Comment
Please, Sign In to add comment