APEXA, LLC
Blog Gallery Contact

Trust relationship between workstation and domain

Blog Date: Monday, July 13, 2009 - Discuss below!

 Recent Blogs << Back

Microsoft Outlook 2007: Minimize to System Tray 7/5/2009

Mozilla Firefox "Save & Quit" doesn't work 7/6/2009

How To Ship Wheels AND Tires for cheap 7/9/2009

 More...
 

IT Jobs Hiring


Data Entry: Make $950/Week - Work At Home w/Fortune 500 companies - Nationwide Positions Available — Work At Home Jobs Carlsbad, CA

SENIOR SOFTWARE ENGINEER (mountain view) S San Francisco, CA

Product Developer – Early Childhood Los Angeles Area, CA

More jobs...
 

userIsInRole =

HttpContext.Current.User.IsInRole(windowsSecurityGroupName);

IPrincipal p = new GenericPrincipal(User.Identity.Name, string[] names);

protected void Application_AuthorizeRequest()
{
    // Validate only html requests, not css or javascript
    if (HttpContext.Current.Request.AcceptTypes != null
        && HttpContext.Current.Request.AcceptTypes.Length > 0
        && HttpContext.Current.Request.AcceptTypes[0].Equals("text/html"))
    {
        if (User.Identity.IsAuthenticated)
        {
            //var roles = new SecurityRoles[]
            //  { SecurityRoles.UserSegmentRead, SecurityRoles.UserSegmentWrite };
            var roles = new String[] { "MailingRead", "MailingWrite" };

            System.Web.HttpContext.Current.User
                = new System.Security.Principal.GenericPrincipal(User.Identity, roles);
        }
    }
}

<system.web>
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
</systen.web>


Tuesday, July 14, 2009 1:21:55 PM

Home | Gallery | Contact | IT Consulting | Forums | Web Marketing | Search Engine Optimization | Web Design & CMS | My Blog on C# .NET

Site Map | Copyright 2007 Web Design web design | Developed by APEXA, LLC

APEXA, LLC