Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ncoblentz
Created June 3, 2013 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncoblentz/5700581 to your computer and use it in GitHub Desktop.
Save ncoblentz/5700581 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using MPRBSL.Helpers;
using WebMatrix.WebData;
namespace MPRBSL.WebServices
{
public class MyServiceAuthorizationManager : ServiceAuthorizationManager
{
protected override bool CheckAccessCore(OperationContext operationContext)
{
return WebSecurity.Initialized && WebSecurity.IsAuthenticated && WebSecurity.CurrentUserName == (HttpContext.Current.Session["UserName"] as string);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment