Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How to set default document in MVC app from web.config?
I use bellow code under <system.webserver>
C#
<defaultDocument enabled="true">
           <files>
               <clear/>
               <add value="FOLDER_NAME/index.html"/>
           </files>
       </defaultDocument>


And bellow code in RouteConfg.cs
C#
routes.MapRoute(
               name: "Default",
               url: "{controller}/{action}/{id}",
               defaults: new { controller = "login", action = "Index", id = UrlParameter.Optional },


please help.
Posted

1 solution

Try like this

XML
<authentication mode="Forms">
           <forms loginUrl="~/Account/LogOn" defaultUrl="~/ReturnFrom/CheckLoggedIn" timeout="2880" />
       </authentication>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900