1

I want to use routing for all incomming calls to my server and then only use the routing on some of these (depending on values in my database).

I know how routing is done, what I don't know is how to abort routing inside my IRouteHandler.

ex

if (routing) 
{
  // do routing 
    var page = BuildManager.CreateInstanceFromVirtualPath(VirtualPath, typeof(IHttpHandler)) as IHttpHandler;
    return page;
}
else 
{
  // proceed as if no routing has been made
}
Andreas
  • 1,311
  • 5
  • 24
  • 39
  • You need to add more information. – EKS Aug 16 '10 at 16:42
  • I actually dont know what more info is needed. I need a way to abort the routing inside the routing. Is there a way to get the initial request and then return it? – Andreas Aug 16 '10 at 17:17

1 Answers1

0
Respone.Redirect()

Then you redirect them to a error or default page.

EKS
  • 5,543
  • 6
  • 44
  • 60
  • thanks, but that would not work since all pages is routed. Actually I don't know how to route all incomming calls yet, but that can't be to hard :) – Andreas Aug 17 '10 at 07:35