tags:

views:

39

answers:

2

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
}
A: 
Respone.Redirect()

Then you redirect them to a error or default page.

EKS
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
A: 

Found my answer:

http://stackoverflow.com/questions/278668/is-it-possible-to-make-an-asp-net-mvc-route-based-on-a-subdomain

Andreas
Don't forget to accept your own answer as a correct one
abatishchev
I will, but can't do that until tomorrow..
Andreas