-
Feb 22nd, 2018, 04:59 AM
#1
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Feb 22nd, 2018, 10:33 AM
#2
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Feb 26th, 2018, 05:26 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|