How to: Create Local IIS Web Sites

Visual Studio 2005

A local Internet Information Services (IIS) Web site is an IIS Web application on your computer. Visual Web Developer communicates with local Web sites by using the HTTP protocol. You can create a new local IIS Web site that uses files in the following ways:
  • You can create a new IIS application, which creates a new folder and files under the IIS root.
  • You can create a Web site that points to an existing IIS application, and then edit the files in that application.
  • You can create a new virtual directory, which creates a new IIS application that points to files that are in a folder other than the IIS root. You can either create a new folder or point to a folder that already contains files.
To create a local IIS Web site requires the following:
  • IIS version 5.0 or later must be installed on your computer and must be running.
  • You must be logged in as a user with administrative privileges. This is required because working with the IIS metabase (where information about IIS applications is stored) requires administrative privileges.
  • ASP.NET 2.0 must be enabled on IIS. For details, see the topic Enabling ASP.NET in the IIS documentation at IIS 6.0 Product Documentation.
To open an existing local IIS Web site, the preceding must be true, and in addition:
  • The site to be opened must be configured as an IIS application.
  • The site must be configured to use ASP.NET 2.0. If it is not, when you open the site, Visual Web Developer will prompt you to reconfigure the site to use ASP.NET 2.0.

To create a local IIS Web site

  1. In Visual Web Developer, on the File menu click New Web Site.
  2. Under Visual Studio Installed Templates, select the template for the type of Web site that you want to create.
  3. To create a Web site directly, do the following:

    1. In the Location list, click HTTP.
    2. In the location box, type the URL of the site to create in the following format: http://localhost/SiteName.
    3. Click OK.
    Alternatively, follow the remaining steps in this procedure to create a Web site based on an existing IIS application or to create a site that uses a virtual directory.
  4. Click Browse.
  5. In the Choose Location dialog box, click the Local IIS tab.
  6. In the tree, open the node for the IIS Web site where you want to create your new Web site. (Typically, this is Default Web Site.)
  7. To create a new IIS application:

    1. Select the node that you want as parent of the IIS application.
    2. Click the Create New Web Application button. Visual Web Developer creates a new folder.
    3. Type a name for the folder.
  8. To create a local IIS Web site that uses files from an existing IIS application:

    1. In the tree, select the node that represents the IIS application you want to work with.
  9. To create a new virtual directory:

    1. Click the Create New Virtual Directory button.
    2. In the New Virtual Directory dialog box, type the alias and then type or select the folder where the files will be located. If the folder does not exist, Visual Web Developer will prompt you to create it.
  10. Click Open to return to the New Web Site dialog box, and then click OK.
Visual Web Developer creates the Web site. If you are creating a new site, Visual Web Developer opens a default page in the page designer, and displays the folder in Solution Explorer.

The Life Cycle of an ASP.NET Page

The Life Cycle of an ASP.NET Page

Database Index

  •  A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space.
  • Indexes can be created using one or more columns of a database table.
  • Providing the basis for both rapid random look ups and efficient access of ordered records.
  • The disk space required to store the index is typically less than that required by the table (since indexes usually contain only the key-fields according to which the table is to be arranged, and exclude all the other details in the table).
  • The users cannot see the indexes, they are just used to speed up searches/queries.
  • Indexes may be defined as unique or non-unique.
CREATE INDEX index_name ON table_name (column_name)
Creates an index on a table. Duplicate values are allowed.

CREATE UNIQUE INDEX index_name ON table_name (column_name)
Creates a unique index on a table. Duplicate values are not allowed.

How does a database index work?

  • An index is sorted by key values, (that need not be the same as those of the table).
  • is small, has just a few columns of the table.
  • refers for a key value to the right block within the table.
  • speeds up reading a row, when you know the right search arguments.

Database Index Tips

  • Put the most unique data element first in the index.
  • Keep indexes small. The smaller the index, the better the response time.
  • For small tables an index is disadvantageous.
  • An index slows down additions, modifications and deletes. It's not just the table that needs an update, but the index as well. 

    Internet

    Internet is a network of networks that consists of millions of private, public, academic, business, and government networks of local to global scope that are linked by a broad array of electronic and optical networking technologies. The Internet carries a vast array of information resources and services, most notably the inter-linked hypertext documents of the World Wide Web (WWW) and the infrastructure to support electronic mail.

    Web Server

    A Web server is a computer that is set up with software and networking capabilities to deliver Web pages on the Internet or an Intranet. Web servers use programs such as Apache or IIS to deliver Web pages over the HTTP protocol.

    • Every Web site sits on a computer known as a Web server.
    • This server is always connected to the internet.
    • Every Web server that is connected to the Internet is given a unique address made up of a series of four numbers between 0 and 256 separated by periods. e.g. 68.178.157.132 or 68.122.35.127.

    There are four leading web server: Apache, IIS, lighttpd and Jagsaw.


    Apart from these Web Servers, there are other Web Servers also available in the market but they are very expansive. Major ones are Netscape's iPlanet, Bea's Web Logic and IBM's Websphere.

    Linux Web Server:

    A Web Server provides the ability to host websites or take advantage of web based applications. In the simplest terms it is where a website that can be viewed through the Internet physically resides.
    Real Time's Linux Web Server takes advantage of Apache, the most widely-used web server software. More web servers use Apache than any other web server software

    Apache HTTP Server:

    This is the most popular web server in the world developed by the Apache Software Foundation. Apache web server is an open source software and can be installed on almost all operating systems including Linux, Unix, Windows, FreeBSD, Mac OS X and more. About 60% of the web server machines run the Apache Web Server.

    Sun Java System Web Server:

    This web server from Sun Microsystems is suited for medium and large web sites. Though the server is free it is not open source. It however, runs on Windows, Linux and Unix platforms. The Sun Java System web server supports various languages, scripts and technologies required for Web 2.0 such as JSP, Java Servlets, PHP, Perl, Python, Ruby on Rails, ASP and Coldfusion etc.

    Jigsaw Server:

    Jigsaw (W3C's Server) comes from the World Wide Web Consortium. It is open source and free and can run on various platforms like Linux, Unix, Windows, Mac OS X Free BSD etc. Jigsaw has been written in Java and can run CGI scripts and PHP programs.

    Windows Web Server:

    Microsoft IIS  (Internet Information Services, formerly called Internet Information Server) is a set of Internet-based services for servers created by Microsoft to be used with Microsoft Windows. It is the world’s second most popular web server only after the Apache HTTP Server.

    We can provide the following features on a Web Server:

    • Services for FTP (File Transfer Protocol).
    • SMTP for e-mail
    • Url Rewrite Module
    • Active Directory Service
    • HTTP/HTTPS for web server
    • File Server
    • MySQL
    • MS SQL Server
    • Dot Net
    • PHP
    • JSP
    • Remote server Administration tools
    • Firewall
    • Antivirus (Server & Client Based)
    • Proxy server
    • 128 bit Encryption
    • SSL Secure Server
    • CGI support 

    Web Browser

    A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content. Hyperlinks present in resources enable users to easily navigate their browsers to related resources.

    While developing a site, we should try to make it compatible to as many browsers as possible. Specially site should be compatible to major browsers like Explorer, FireFox, Netscape, Opera and Safari.

    History of the web browser:

    The NCSA Mosaic Web browser in 1993 – one of the first graphical Web browsers.
    Mosaic was developed at the National Center for Supercomputing Applications (NCSA) at the University of Illinois Urbana-Champaign beginning in late 1992.

    Marc Andreessen, the leader of the Mosaic team at NCSA, soon started his own company, named Netscape, and released the Mosaic-influenced Netscape Navigator in 1994, which quickly became the world's most popular browser, accounting for 90% of all Web use at its peak.

    Microsoft responded with its browser Internet Explorer in 1995 (also influenced by Mosaic), initiating the industry's first browser war. By bundling Internet Explorer with Windows Operating System. Internet Explorer usage share peaked at over 95% by 2002. Internet Explorer has 60% browser usage share as of April 2010 according to Net Applications.

    Opera first appeared in 1996, having 2% browser usage share as of April 2010. It has a substantial share of the fast-growing mobile phone Web browser market.

    In 1998, Netscape launched what was to become the Mozilla Foundation in an attempt to produce a competitive browser using the open source software model. That browser would eventually evolve into Firefox. As of April 2010, Firefox has a 25% usage share.

    Apple's Safari  had its first beta release in January 2003; as of October 2009, it has a dominant share of Apple-based Web browsing, accounting for just under 5% of the entire browser market as of April 2010. Its rendering engine, called WebKit, is also running in the standard browsers of several mobile phone platforms, including the iPhone OS, Google Android, Nokia S60 and Palm WebOS.

    The most recent major entrant to the browser market is Google's WebKit-based Chrome, first released in September 2008. As of April 2010, it has a 7% usage share.

    Function:

    The primary purpose of a web browser is to bring information resources to the user. This process begins when the user inputs a Uniform Resource Identifier (URI), into the browser.

    The most commonly used kind of URI starts with http: and identifies a resource to be retrieved over the Hypertext Transfer Protocol (HTTP). Many browsers also support a variety of other prefixes, such as https: for HTTPS, ftp: for the File Transfer Protocol, and file: for local files.

    HTML is passed to the browser's layout engine to be transformed from markup  to an interactive document. Aside from HTML, web browsers can generally display any kind of content that can be part of a web page.

    Most browsers can display images, audio, video, and XML files, and often have plug-ins to support Flash applications and Java applets (A Java applet is an applet delivered to the users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine (JVM)). Upon encountering a file of an unsupported type or a file that is set up to be downloaded rather than displayed, the browser prompts the user to save the file to disk.

    Interactivity in a web page can also be supplied by Javascript, which usually does not require a plug-in. Javascript can be used along with other technologies to allow "live" interaction with the web page's server via AJAX.

    A cookie, also known as a web cookie, browser cookie, and HTTP cookie, is a piece of text stored by a user's web browser. A cookie can be used for authentication, storing site preferences, shopping cart contents, the identifier for a server-based session, or anything else that can be accomplished through storing text data.

    Web 2.0

    The term Web 2.0 is commonly associated with web applications that facilitate interactive information sharing, interoperability, user-centered design, and collaboration on the World Wide Web.

    Examples of Web 2.0 include social-networking sites, blogs, wikis, video-sharing sites, hosted services, web applications, mashups and folksonomies.

    Technologies:

    The client-side/web browser technologies typically used in Web 2.0 development are Asynchronous JavaScript and XML (Ajax), Adobe Flash and the Adobe Flex framework, and JavaScript/Ajax frameworks such as Yahoo! UI Library, Dojo Toolkit, MooTools, and jQuery. Ajax programming uses JavaScript to upload and download new data from the web server without undergoing a full page reload.

    On the server side, Web 2.0 uses many of the same technologies as Web 1.0. New Languages such as PHP, Ruby, ColdFusion, Perl, Python, JSP and ASP  are used by developers to dynamically output data using information from files and databases. What has begun to change in Web 2.0 is the way this data is formatted.

    What has begun to change in Web 2.0 is the way this data is formatted and share data.

    To share its data with other sites, a web site must be able to generate output in machine-readable formats such as XML, RSS, and JSON.

    Concepts:

    Web 2.0 draws together the capabilities of client-side and server-side software, content syndication and the use of network protocols. Standards-oriented web browsers may use plug-ins and software extensions to handle the content and the user interactions. Web 2.0 sites provide users with information storage, creation, and dissemination capabilities.

    Web 2.0 websites typically include some of the following features and techniques:


    Search
        Finding information through keyword search.

    Links
        Connects information together into a meaningful information ecosystem using the model of the Web, and provides low-barrier social tools.

    Authoring
        The ability to create and update content leads to the collaborative work of many rather than just a few web authors. In wikis, users may extend, undo and redo each other's work. In blogs, posts and the comments of individuals build up over time.

    Tags
        Categorization of content by users adding "tags" - short, usually one-word descriptions - to facilitate searching, without dependence on pre-made categories. Collections of tags created by many users within a single system may be referred to as "folksonomies".

    Extensions
        Software that makes the Web an application platform as well as a document server.

    Signals
        The use of syndication technology such as RSS to notify users of content changes.