Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the default page of my application in IIS7?

Tags:

iis-7

I deployed my web application to IIS7 and everything works just fine. However, instead of typing the url of my true starting page, I want it to automatically go to www.xxxxxx.com/views/root/default.aspx.

How do I do this?

like image 641
DenaliHardtail Avatar asked Nov 17 '10 19:11

DenaliHardtail


People also ask

How do I set a default document?

In the Home pane, double-click Default Document. In the Add Default Document dialog box, type the name of the default document that you want to add in the Name box, and then click OK.

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.


4 Answers

Just go to web.config file and add following

<system.webServer>     <defaultDocument>       <files>         <clear />         <add value="Path of your Page" />       </files>     </defaultDocument> </system.webServer> 
like image 90
Karan Savla Avatar answered Oct 13 '22 22:10

Karan Savla


  1. On IIS Manager select your page in the Sites tree.
  2. Double click on configuration editor.
  3. Select system.webServer/defaultDocument in the drop-down.
  4. Change the "default.aspx" to the name of your document.
like image 21
NJoco Avatar answered Oct 13 '22 22:10

NJoco


Karan has posted the answer but that didn't work for me. So, I am posting what worked for me. If that didn't work then user can try this

<configuration> 
    <system.webServer> 
        <defaultDocument enabled="true"> 
            <files> 
                <add value="myFile.aspx" /> 
            </files> 
        </defaultDocument> 
    </system.webServer>
</configuration> 
like image 36
Zerotoinfinity Avatar answered Oct 13 '22 23:10

Zerotoinfinity


On IIS Manager--> Http view--> double click on Default and write the name of your desired startup page, Thats it

like image 23
Arsalan Saleem Avatar answered Oct 13 '22 23:10

Arsalan Saleem