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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -