If you've no access to control panel, one work around you can use is to do a permanent redirect to the default page you want. Lets suppose currently the default page is default.aspx and you want to do a permanent redirect to home.aspx, write this in Page_Load
(or Page_Init) of defautl.aspx page.
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "http://www.mywebsite.com/home.aspx");
Thanks.
MARK AS ANSWER if it helps
Marked as answer by Chen Yu - MSFT on Dec 25, 2012 02:46 AM
What is your default page name? You have to configure webconfig file as below with your default page name. Or show the error msg.
<system.webServer>
<defaultDocument>
<files>
<add value="~/Default.aspx"/>
</files>
</defaultDocument>
</system.webServer
in the Default.aspx.cs redirect to the start page eg(login.aspx, home.aspx, etc) this way u need not do any changes on iis.
the default page in iis in Default.aspx.
Please remember to click " Mark As Answer " on the post that helps you. This can be beneficial to other community members reading the thread.
Good Luck
mymensingh25...
0 Points
12 Posts
default page is not working
Dec 17, 2012 10:40 PM|LINK
i tried to set default page in web.config file. but it is not working on my server.
sen338
Member
498 Points
118 Posts
Re: default page is not working
Dec 17, 2012 10:48 PM|LINK
Set the default page in IIS
oned_gk
All-Star
31515 Points
6433 Posts
Re: default page is not working
Dec 17, 2012 11:48 PM|LINK
What do you mean default page in web.config? You need to configure IIS to set default page.
mymensingh25...
0 Points
12 Posts
Re: default page is not working
Dec 18, 2012 06:32 AM|LINK
site is hosting and i cannot access iis and configure it .
i put <authentication mode="form">
<form defaulturl="index.html">
</form>
</form>
=============
it is not working at all
Primillo
Star
8731 Points
1681 Posts
Re: default page is not working
Dec 18, 2012 06:36 AM|LINK
You need to go to the Control Panel
Primillo
http://www.facebook.com/programandopuntonet
geniusvishal
Star
14214 Points
2803 Posts
Re: default page is not working
Dec 18, 2012 06:41 AM|LINK
Try to re-configure your web.config like this:
<system.webServer> <defaultDocument> <files> <add value="~/Default.aspx"/> </files> </defaultDocument> </system.webServer>Then go to:
and Check whether the default document is Default.aspx or not..
Refer this as well:
http://stackoverflow.com/questions/1125280/setting-the-default-page-for-asp-net-visual-studio-server-configuration
My Website
www.dotnetvishal.com
deepthoughts
Contributor
7288 Points
1051 Posts
Re: default page is not working
Dec 18, 2012 06:57 AM|LINK
If you've no access to control panel, one work around you can use is to do a permanent redirect to the default page you want. Lets suppose currently the default page is default.aspx and you want to do a permanent redirect to home.aspx, write this in Page_Load (or Page_Init) of defautl.aspx page.
Response.Status = "301 Moved Permanently"; Response.AddHeader("Location", "http://www.mywebsite.com/home.aspx");Thanks.
suman1282
Member
30 Points
28 Posts
Re: default page is not working
Dec 18, 2012 07:01 AM|LINK
What is your default page name? You have to configure webconfig file as below with your default page name. Or show the error msg. <system.webServer> <defaultDocument> <files> <add value="~/Default.aspx"/> </files> </defaultDocument> </system.webServermymensingh25...
0 Points
12 Posts
Re: default page is not working
Dec 18, 2012 07:39 AM|LINK
DotNetRaven
Member
236 Points
52 Posts
Re: default page is not working
Dec 19, 2012 08:03 AM|LINK
always keep ur default page as(Default.aspx)
in the Default.aspx.cs redirect to the start page eg(login.aspx, home.aspx, etc) this way u need not do any changes on iis.
the default page in iis in Default.aspx.
Good Luck