This is a migrated thread and some comments may be shown as answers.

[Solved] Why does Q3 2012 use InternalHttpContextBase?

2 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrei
Top achievements
Rank 1
Andrei asked on 26 Nov 2012, 08:30 AM
Hi,

I see that Q3 2012 uses InternalHttpContextBase class for routing. Now after upgrade to the latest Telerik MVC extensions version my site does not work because of it. I use my custom route. Please find it below:
public class LocalizedRoute : Route
{
   public override RouteData GetRouteData(HttpContextBase httpContext)
   {
         string applicationPath = httpContext.Request.ApplicationPath;
 
         //some logic here
         RouteData data = base.GetRouteData(httpContext);
         return data;
    }
}


As you can see I use httpContext object here and it throws an exception (not implemented exception) when I try to access "httpContext.Request.ApplicationPath" because your new InternalHttpContextBase is passed here instead of the default HttpContext. Excuse me but who made such a stupid architecture decision? There's even no way to override it this behavior.

Please explain what this class is used for and what will happen if I remove it?

2 Answers, 1 is accepted

Sort by
0
Andrei
Top achievements
Rank 1
answered on 27 Nov 2012, 11:47 AM
Any comment from the team about this new class?
0
Andrei
Top achievements
Rank 1
answered on 14 Mar 2013, 10:03 AM
Oh c'mon guys... I've just downloaded 2013Q1 release and it is still the same. It's really bad...

Why can't I use my own Routes? Why do you register your custom RouteDataCache with this InternalHttpContextBase?
Tags
General Discussions
Asked by
Andrei
Top achievements
Rank 1
Answers by
Andrei
Top achievements
Rank 1
Share this question
or