VIRTUAL DIRECTORY
IS CREATE TO
REPRESENT OUR APPLICATION ON IIS SERVER
FILE NEW
WEBSITE ASP.NET WEB SITE
LACATION
FILE SYSTEM
HTTP
FTP
FILE
SYSTEM
IN XP HOME BASIC WE CAN NOT INSTALL THE IIS
SERVICE. SO IT IS DIFFICULT TO DEVELOP AND DEPLOYMENT OUR WEB SITE IN THIS
WINDOW
SO MICROSOFT .NET PROVIDE AN INBUILD
FACILITY (ASP.NET SERVER BUILDER) BY THAT WE CAN DEVELOPED OUR WEBSITES BUT WE
CNANOT DEPLOYE IT, IN THIS CASE WE USE FILE
SYSTEM WHERE PHYSICAL LOCATION CAN BE ANY WHERE .
FILE SYSTEM IS USED TO
CONNECT WITH YOUR SPACE YOU HAVE TAKEN FROM ANOTHER SERVER
LOCATION IN FTP ENTER URL OR CLICK ON BROWSE ENTER THE
URL OF YOUR SERVER WHO HAVE PROVIDED YOU SPACE
HTTP
IT STANDS FOR HYPER TEXT TRANSFER PROTOCOL.
BUT IT IS STATELESS PROTOCOL. WE CAN NOT MANAGE THE STATE OF REQUEST IN THIS.
WHEN WE USE HTTP IT MEANS WE ARE RUNNING OUR WEBSITE UNDER IIS SERVER.
HERE VIRTUAL DIRECTORY IS CREATED OWN SELF BY THE HTTP PROTOCOL
THE
PHYSICAL LOCATION OF YOUR VIRTUAL DIRECTORY IS IN
C :\\Inetpub\www root
name of your virtual directory
IF YOU CREATE A PAGE IN FILE SYSTEM THAN
YOU HAVE TO MAPPED YOUR FILE WITH IIS(MEANS CREATE VIRTUAL DIRECTORY) TO DEPLOY
YOUR WEBSITE
TO CREATE VIRTUAL DIRECTORY
1.
RIGH CLICK ON
FOLDER
2.
WEB SHARING
3.
SHARE THIS FOLDER
4.
GIVE ALIAS NAME
5.
APPLY
6.
OK
NOW CREATE A WEBSITE
THAN
IT WILL OPEN A NEW PAGE DEFAULT.ASPX TO MAKE
YOUR WEBSITE CLICK ON DESIGN TO DO DESIGNING OF YOUR WEBSITE
WEB.CONFIG
IT IS A FILE TO
SEE ALL SETTINGS, WE CAN SEE HERE ALL
THE SETTINGS. IT IS AN XML FILE BASE WHERE YOU CAN STORE YOUR ALL
APPLICATION SETTINGS, SECURITY SETTINGS ALSO USER SETTINGS
·
TO ADD NEW
PAGE
·
RIGHT CLICK ON
FORM
·
ADD NEW ITEM
·
HTML TO CREATE
STATIC PAGES
·
DEFAULT.ASPX TO
CREATE DYNAMIC PAGES
CONTROLS
THERE ARE TWO
TYPE OF CONTROLS
1. HTML CONTROLS TOOLS
2. SERVER CONTROLS TOOLS
WE CAN NOT ACCESS THE HTML TOOLS IN SERVER PAGE , TO
ACCESS THEM WE HAVE TO ADD <run at =”server”>
IN SERVER PAGE WE CAN USE BOTH SERVER AND HTML
CONTROLS WHERE IN HTML PAGE WE CAN USE ONLY HTML CONTROLS ONLY
CREATE THE SAME WORK BY ASP.NET
OPEN A
WEB APPLICATION USING HTTP
ADD A NEW
HTML PAGE
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled
Page</title>
</head>
<body>
<form
name="from"
action="Default2.aspx"
method="get">
<marquee
width="100%"
height="20px"
bgcolor="yellow"
behabiour="alternate"><font face="Times new Roman" color="blue" size="14">
welcome to the login page</font></marquee>
<fieldset>
<legend>login</legend>
<center>
<b>username</b><input type="text" name="t1"/>
<br/>
<br/>
<b>password</b><input type="text" name="t2"/>
<br/>
<br/>
<input
type="submit"
name="s1"
value="login"/>
</center>
</fieldset>
</body>
</html>
ADD A SERVER PAGE
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial
class Default2
: System.Web.UI.Page
{
protected void Page_Load(object
sender, EventArgs e)
{
string
uname = Request.QueryString["t1"];
string
pass = Request.QueryString["t2"];
if(uname=="ducat"
&& pass=="noida")
{
Response.Write("welcome to the home page of server");
}
else
{
Response.Write("invalid
user id and password");
}
}
}
No comments:
Post a Comment