Click here to Skip to main content
15,911,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,

I have a asp.net project,it is working fine but when i upload it on webserver then
i enter the web address(e.g.www.xyz.com) in URL then it is showing only index.html,while in web.config, i made changes as
XML
<customerrors mode="On" defaultredirect="Default.aspx"></customerrors>

according to it ,it should show the Default.aspx Problem is this it is showing only index.html.If i rename the index.html then it is showing 404 error(web page not found).
My need is i want to display Default.aspx as first page after entering URL.

PLS help me out.

Thanks
Abhishek
Posted
Updated 7-Jun-12 18:09pm
v2

1 solution

My need is i want to display Default.aspx as first page after entering URL.
Where did you learnt/read/told-off that to have a startup page you need to use 'CustomErrors' tag? :doh:

Try one of these:
- If you are using IIS as webserver (hosted environment), there is a tab for startup page where you can set it.

- You can set it in web project properties. Steps:
1. Go to your project's properties and set the start page property.
2. Go to the project's Properties
3. Go to the Web tab
4. Select the Specific Page radio button
5. Type in the desired url in the Specific Page text box

- As such, if you are implementing FormAuthentication, then you can use that for setting up the start page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900