Link to home
Start Free TrialLog in
Avatar of jdouthit
jdouthitFlag for United States of America

asked on

How to change default startup page

I have my default web site created in IIS7.  It is set to the default directory, C:\inetpub\wwwroot.  I have a form in another directory that I would like to be the startup page.  That form is located under C:\Program Files (x86)\application\files\Forms\LoginForm.aspx.  I know how to change the default directory to point to the directory the form is in, but how do I change the default page to LoginForm.aspx without changing the name of the form?
Avatar of haloexpertsexchange
haloexpertsexchange
Flag of United States of America image

Go under the properties of your website, go to the documents tab.
There should be a list of default documents, add your LoginForm.aspx as a default document and make sure that it is on the top of the list.
Sorry if the directions are a little off, I've got IIS 6 not 7 but this should be about right.
Avatar of jdouthit

ASKER

Okay.  I changed the default directory to the one where my form is listed.  I then added that page as the default at the top of the list.  I now receive this error:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

Avatar of LuisGuerrero
Add the folder with your startup page as virtual directory or as application under your default web site, and also add your LoginForm.aspx as default document under the application or virtual directory.

You should also add or modify a default document under your default web site (default.html or something else) to redirect to your login file.

Try again, but this time use a browser in your server, so you have the full error description and the generic one you posted
I added a virtual directory and accessed it via the virtual directory on the host server.  I receive the following error.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'FacilityLink2.LoginForm'.

Source Error:


Line 1:  <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="LoginForm.aspx.vb" Inherits="FacilityLink2.LoginForm" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

Source File: /facilitylinkforms/LoginForm.aspx    Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
ASKER CERTIFIED SOLUTION
Avatar of LuisGuerrero
LuisGuerrero
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial