Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to specify application default web page in web.config ?

Reply
Thread Tools

How to specify application default web page in web.config ?

 
 
thomas
Guest
Posts: n/a
 
      10-11-2006
How to specify application default web page in web.config?
I mean, default web page, not a login page.
Is it possible?

Tomasz


 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2F1cmk=?=
Guest
Posts: n/a
 
      10-11-2006
This is an IIS setting. Get the properties of your application in IIS and
check out the "Documents" tab ,here you can change the default pages.

 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      10-11-2006
Hi,

thomas wrote:
> How to specify application default web page in web.config?
> I mean, default web page, not a login page.
> Is it possible?
>
> Tomasz


I don't think this is possible. However, you can specify the default
page for a web application using the IIS console.

With IIS7, you will be able to specify much more properties using the
web.config file, but this is not possible in IIS5 and IIS6.

Scott Guthrie has tons of interesting information about IIS:
http://weblogs.asp.net/scottgu/default.aspx

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
thomas
Guest
Posts: n/a
 
      10-12-2006
OK, so here is the answer.

With ASP.Net 2.0 it is actually very simple:

<system.web>
<urlMappings>
<add url="~/Default.aspx" mappedUrl="~/MyStartPage.aspx"/>
</urlMappings>
</system.web>

In ASP.Net 1.1 Application_BeginRequest event needs to be handled in the
Global.asax

Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
If Request.RawUrl.ToUpper().IndexOf("DEFAULT.ASPX") > -1 Then
Response.Redirect("MyStartPage.aspx")
End If
End Sub

Of course, "MyStartPage.aspx" can be stored as a configurable setting in
web.config.

TJ


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to specify default directory for saving files in IDLE JohnJohnUSA Python 1 07-04-2006 09:19 PM
How to specify default value to a variable of unconstrained type INSIDE a VHDL procedure ? Pankaj VHDL 2 08-23-2004 04:36 AM
Anyone ever setup a custom error page? Mine doesn't work if I specify it as a page Larry Woods ASP General 16 07-11-2004 09:10 PM
tablemodel: how to specify default editor for each cell in a column Peter Grison Java 1 05-20-2004 05:53 PM



Advertisments