asp.net mvc - mvc forms authentication landing page -


i have mvc website uses forms authentication. attempting add default landing page site ( landing.html ) each user hitting

http://mywebsite.com example redirected to.

i tried setting default document in web.config, redirected account/login page.

i not want change login url because make user's session has expired go landing page, not want.

any appreciated.

thanks

update "default" route. mvc projects have following route defined in routeconfig class , called in global.asax during application startup.

public class routeconfig {     public static void registerroutes(routecollection routes)     {         routes.ignoreroute("{resource}.axd/{*pathinfo}");          routes.maproute(             name: "default",             url: "{controller}/{action}/{id}",             defaults: new { controller = "home", action = "index", id = urlparameter.optional }         );     } } 

just replace "home" , "index" controller , method want use default landing page.

also sure if controller has [authorize] attribute added need add [allowanonymous] attribute method want use.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -