Accessing RequestContext from with my MembershipProvider
Posted
by
ScottSEA
on Stack Overflow
See other posts from Stack Overflow
or by ScottSEA
Published on 2011-01-13T22:44:46Z
Indexed on
2011/01/13
22:54 UTC
Read the original article
Hit count: 201
Is there an easier/better way to access the RequestContext from within a custom Membership Provider than the following (and further, will this method even work):
private static RequestContext GetRequestContext()
{
HttpContextBase contextBase =
new HttpContextWrapper(HttpContext.Current);
return new RequestContext(
contextBase,
RouteTable.Routes.GetRouteData(contextBase));
}
© Stack Overflow or respective owner