dcsimg
Results 1 to 3 of 3

Thread: Default document in IIS perhaps?

  1. #1

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,383

    Default document in IIS perhaps?

    Hi.

    Is there a way to ignore the MVC application and just set a default document to IIS?

    Using the old asp pages way does not seem to work.

    Do I need to set it to global.asax ? If so then how?

    I found something like the below. But I do not know what to set on the parameters. Where do i set the html page I want as default? thanks

    routes.MapRoute("routeName", "", new { controller = "Home", action = "FirstPage" });


    Trying this:

    Does not seem to work, i get error 500

    <rewrite>
    <rules>
    <rule name="TEST" stopProcessing="true">
    <match url="^default.html" />
    <action type="Redirect" url="/default.html" redirectType="Temporary" />
    </rule>
    </rules>
    </rewrite>

    I would prefer IIS solution rather than manipulating web or global
    Last edited by sapator; Feb 22nd, 2018 at 07:34 AM.
    Slow as hell.

  2. #2

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,383

    Re: Default document in IIS perhaps?

    Old ways are the good ways.
    An old asp.net trick with using App_Offline.htm does the trick but our of curiosity I would like to make this work also.
    Slow as hell.

  3. #3
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,474

    Re: Default document in IIS perhaps?

    cant you just add this to your web config file -

    <system.webServer>
    <defaultDocument enabled="true">
    <files>
    <clear/>
    <add value="default.html"/>
    </files>

    </system.webServer>
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width