Accessing RequestContext from with my MembershipProvider
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 Request开发者_高级运维Context(
contextBase,
RouteTable.Routes.GetRouteData(contextBase));
}
As @Aliostad mentioned: use HttpContext.Current.Request
instead. He wouldn't repost his comment as an answer, so ...
精彩评论