Microsoft KB Archive/321748

= HOW TO: Create a Local Web Server ASP.NET Application =

Article ID: 321748

Article Last Modified on 6/25/2004

-

APPLIES TO


 * Microsoft ASP.NET 1.0
 * Microsoft .NET Framework 1.0
 * Microsoft Windows 2000 Standard Edition
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q321748



For additional information about how to perform this task by using Microsoft Active Server Pages, click the article number below to view the article in the Microsoft Knowledge Base:

301184 HOW TO: Create a Visual InterDev Project

IN THIS TASK
SUMMARY
 * Create a Local Web Server ASP.NET Application
 * Create the Project
 * Browse the Project



SUMMARY
This article describes how to create a local Web Server ASP.NET application.

back to the top

Create a Local Web Server ASP.NET Application
 Start Microsoft Visual Studio .NET. On the File menu, point to New, and then click Project. In the New Project dialog box, click Visual Basic Projects under Project Types, and then click ASP.NET Web Application under Templates to create the project in Visual Basic.

NOTE: Alternatively, you can click Visual C# Project under Project Types, and then click ASP.NET Web Application under Templates to create the project in Visual C#. In the IIS Web folder (which is typically /wwwroot), create the essential project references and files to use as a starting point for your application:   AssemblyInfo (.vb file for Visual Basic or .cs file for Visual C#): Use this file to describe the assembly and to specify version information. using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyTitle(&quot;&quot;)] [assembly: AssemblyDescription(&quot;&quot;)] [assembly: AssemblyConfiguration(&quot;&quot;)] [assembly: AssemblyCompany(&quot;&quot;)] [assembly: AssemblyProduct(&quot;&quot;)] [assembly: AssemblyCopyright(&quot;&quot;)] [assembly: AssemblyTrademark(&quot;&quot;)] [assembly: AssemblyCulture(&quot;&quot;)] [assembly: AssemblyVersion(&quot;1.0.*&quot;)] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile(&quot;&quot;)] [assembly: AssemblyKeyName(&quot;&quot;)]   Global.asax: The basic file Global.asax.cs that contains code for responding to application-level events that ASP.NET raises.

<%@ Application Codebehind=&quot;Global.asax.cs&quot; Inherits=&quot;WebApplication2.Global&quot; %> NOTE: The source of Global.asax.cs is not included in this document.  Styles.css: This file contains the default HTML style settings.</li> Web.config: This is an application configuration file that contains settings that are specific to an application. This file contains configuration settings that the common language runtime reads (such as assembly binding policy, remoting objects, and so on), and settings that the application can read.</li> Projectname.vsdisco: This is an XML-based file that the ASP.NET dynamic XML Web service discovery process uses to identify searchable paths on the Web server.</li>  WebForm1.aspx: This file contains the portion of the default Web Forms page that contains user interface elements (controls), similar to an HTML page. <%@ Page language=&quot;c#&quot; Codebehind=&quot;WebForm1.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;WebApplication2.WebForm1&quot; %> <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot; > WebForm1 <meta name=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 7.0&quot;> <meta name=&quot;CODE_LANGUAGE&quot; Content=&quot;C#&quot;> <meta name=vs_defaultClientScript content=&quot;JavaScript&quot;> <meta name=vs_targetSchema content=&quot;http://schemas.microsoft.com/intellisense/ie5&quot;> <body MS_POSITIONING=&quot;GridLayout&quot;> <form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;> </li> Webform1 (.vb file for Visual Basic or .cs file for Visual C#): This file contains a class file for the default Web Forms page that contains the system-generated and user code for the page.</li></ul> </li> After you create the project, you see an empty Web Form with that is named &quot;WebForm1.aspx.&quot; This is the workspace of the first page in a project, in which you can place WebForms, HTML forms, Components, Data objects, and Clipboard elements from ToolBox.</li></ol>

back to the top

Create the Project
WARNING: After you create this page, you have to build the application. If you do not, you receive the following error messages:

Server Error in '/WebApplication2' 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 'WebApplication2.Global'

Source Error:

Line 1: <%@ Application Codebehind=&quot;Global.asax.cs&quot; Inherits=&quot;WebApplication2.Global&quot; %>

Source File: c:\inetpub\wwwroot\WebApplication2\global.asax Line: 1

back to the top

Browse the Project
After the system works correctly, browsing the page that you created displays the location that you entered in the Creating Project dialog box.

For this example, the following location is displayed:

http://localhost/WebApplication2/WebForm1.aspx

back to the top

Keywords: kbhowto kbhowtomaster KB321748

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.