开发者

Accessing RequestContext from with my MembershipProvider

开发者 https://www.devze.com 2023-02-04 20:00 出处:网络
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):

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 ...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号