If you have a an application in a directory (application) called virtualdirectory
, then the URL of your application is http://my.domain.com/virtualdirectory/
.
However, if you want to use http://my.domain.com/
as your start URL you need to
Method 1
Move everything from C:\Inetpub\wwwroot\virtualdirectory
to C:\Inetpub\wwwroot\
I'ld only recommend this course of action if this is the only application you have, or if this is the core application.
Method 2
OR you could try changing the home / root direcory
Method 3
OR you could create a file called c:\inetpub\wwwroot\default.aspx
and stick this in
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="Portal.App.WebForm2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e) {
Server.Transfer("virtualdirectory/default.aspx");
// or
// Response.Redirect("http://my.domain.com/virtualdirectory/default.aspx");
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>