i have default.aspx and index.html. I uploaded both to the server, but i want my first page start with index.html. What should I do?
Asked
Active
Viewed 5,173 times
5 Answers
8
If you do not have access to IIS, and you are hosted on IIS 7 (Windows Server 2008), you may want to put this into your web.config
file:
<system.webServer>
<defaultDocument>
<files>
<clear / >
<add value="index.html" />
</files>
</defaultDocument>
</system.webServer>

Daniel Vassallo
- 337,827
- 72
- 505
- 443
-
This is the correct solution, but watch out if you copy and paste it. There's a space between the `/` and the `>` in the `
` tag. Since it's less than a six-character fix, I can't edit it. – JamesQMurphy Feb 12 '15 at 15:40
3
You need to configure it in the properties of the virtual directory hosting the ASP.NET application. Put index.html
before default.aspx
(source: plus2net.com)

Glorfindel
- 21,988
- 13
- 81
- 109

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928
2
You need to change the order of default document list to bring index.htm to the top, on IIS6 this found on the Documents tab of Properties dialog on the site in IIS manager.

AnthonyWJones
- 187,081
- 35
- 232
- 306
2
in your default.aspx page write this in your code behind if you don't have access to IIS.
Response.Redirect("index.htm");

this. __curious_geek
- 42,787
- 22
- 113
- 137
1
You need to set this up in IIS. In the IIS manager, this will be under the Documents
tab.

Oded
- 489,969
- 99
- 883
- 1,009