ASP.NET MVC Routes Login/Logout Problem

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-02-15T19:30:40Z Indexed on 2010/03/24 17:03 UTC
Read the original article Hit count: 236

Filed under:
|

Hi Guys,

Relatively new to ASP.NET MVC and little confused about how to do routing. My problem basically relates to "logged in" and "logged out routes" and having both as "/".

i.e. I have home/index for logged out user which appears as "/" but this has got me confused as to how I can have home/home for logged in user and still have "/".

I keep getting 127.0.0.1/home/home

I could modify like 127.0.0.1/home - but I want it like "/". My confusion relates to the fact that the "/" [127.0.0.1/] is bound in the routes collection to home/index.

Does anyone know how I can modify the routes dictionary (which will be binded ONCE at the start) so that the "/" can be shared for logged and non-logged users ?

Thanks?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about routing