dumbel
dumbel

Reputation: 205

Change startup page

I;m trying to change my startup page from Default.aspx to Login.aspx. But it wont seem to work. I'm using a masterpage as well.

Ive been trying right clicking on login.aspx and "set as start page" and right clicking on my projekt / property pages / start options / and adding login.aspx in there. But it still starts with Default.aspx.

Any suggestions would help me.

Upvotes: 2

Views: 2385

Answers (2)

Chris Fulstow
Chris Fulstow

Reputation: 41902

If you don't want to change your IIS web server settings, you can always set Default.aspx to immediately redirect to Login.aspx by adding this code to your Default.aspx Page_Load:

Response.Redirect("Login.aspx");

Upvotes: 2

John Hoven
John Hoven

Reputation: 4085

This setting is only used when debugging. To accomplish this in normal situations, you'll need to go into IIS and set Login.aspx as a default document and move it up to the top of the files that IIS looks for when serving a default document.

IIS6: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/dc6eb1b4-9028-4308-9935-52b64edfad36.mspx?mfr=true

IIS7: http://technet.microsoft.com/en-us/library/cc753615%28WS.10%29.aspx

Upvotes: 6

Related Questions