ASP.NET Web Sites on the File System

ASP.NET Web Sites created on the file system rely on the development Web server bundled with Visual Studio 2008.
Whether you click Debug | Start Debugging or just right-click a Web page in the Solution Explorer window, the
development Web server automatically starts. This is the same Web development server that was bundled with Visual
Studio 2005. This allows you to easily step though and debug all client-side JavaScript and server-side ASP.NET code.

ASP.NET allows you to build Web Applications without the complexity of Microsoft IIS. The command line Web
server (
WebDev.WebServer.exe) can be used to host your ASP.NET Web content files (*.aspx, *.asmx, etc) from any
directory on your machine. This can be helpful for team building purposes/testing. Of course, you would never use
WebDev.WebServer.exe as a production level Web server! It is a development tool only!

If you issue the “-?” option to the WebDev.WebServer.exe utility from a Visual Studio 2008 command prompt, you
will find a dialog box which shows you all possible “start up” options.



















Note that ASP.NET Web Sites in Visual Studio 2008 are configured by default to make use of WebDev.WebServer.exe
behind the scenes, so you do not need to start it manually.






















ASP.NET Web Sites automatically reference a core set of .NET assemblies that offer you most of the functionality
you’ll need:
      •        mscorlib.dll and System.dll
      •        System.Configuration.dll, System.EnterpriseServices.dll
      •        System.Data.dll, System.Xml.dll, System.Drawing.dll.
      •        System.Web.dll, System.Web.Services.dll and System.Web.Mobile.dll.

New with .NET 3.5, you also get automatic references to:
      •         System.Core.dll
      •        System.Web.Extensions.dll
      •        System.Data.DataSetExtensions.dll
      •        System.Xml.Linq.dll

You can see the references in the Web.config file.


<system.web>
<!--
  Set compilation debug="true" to insert debugging symbols into the compiled
page. Because this
  affects performance, set this value to true only during development.
-->
<compilation debug="false">
  <assemblies>
    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
  </assemblies>
</compilation>


As you would expect, if you require additional assemblies, you can use the “Add Reference” dialog box. When you add
a reference to a shared assembly, entries are added to Web.config file, right after the four assemblies shown above. If
the referenced assembly is a private assembly, it is copied to the /Bin/ folder.

Assume that you need to reference System.Data.OracleClient.dll. Because this assembly is shared in the GAC, Visual
Studio 2008 automatically adds an entry to the Web.config file:


<system.web>
<!--
  Set compilation debug="true" to insert debugging symbols into the compiled
page. Because this
  affects performance, set this value to true only during development.
-->
<compilation debug="false">
  <assemblies>
    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral,
      PublicKeyToken=B77A5C561934E089"/>
  </assemblies>
</compilation>


On the other hand, if you were to reference a private assembly, a copy of the *.dll will be placed in your /Bin/ folder,
which is automatically created, if necessary.
ASP.NET Web Sites on the File System
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials
Services