Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting Default WebPage in IIS 7.5

Tags:

iis

iis-7.5

I'd a HD problem in machine where my Intranet IIS server was installed and I've reinstalled all the software. I've restored the site data into new IIS but now, when I type the server address in a browser in a client or even server machine, it doesn't find the page ("Default.aspx"). I can allow "Directory browsing" and click the file but, obviously, I don't want this alternative, neither obligating users to type "Default.aspx" in the end of the URL.

Maybe it's a very simple configuration, but I've cannot found it in IIS.

like image 556
Alex Avatar asked Apr 11 '11 15:04

Alex


People also ask

How do I set the default page in IIS?

Right-click the Web site, virtual folder, or folder whose default document settings you want to configure, and then click Properties. Click the Documents tab. Click to select the Enable Default Document check box. This turns on default document handling for the Web site, virtual folder, or folder that you selected.

What is default Web site in IIS?

The Default Web Site is simply the first, and most common, "site" on your IIS server. It is true you can place sites beneath your "Default Web Site" but these are actually nested "applications". Sites are mapped to a specific folder, and generally applications are mapped to specific nested subfolders.


1 Answers

Put the following in site's or application's web.config file:

<system.webServer>
    <defaultDocument>
        <files>
            <add value="~/Default.aspx"/>
        </files>
    </defaultDocument>
</system.webServer>
like image 89
Thomas Avatar answered Sep 29 '22 20:09

Thomas