AspNetDevelopmentServer Class

Represents the settings for an instance of the ASP.NET Development Server. More than one instance may occur during a test.


Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

public class AspNetDevelopmentServer : IXmlTestStore

The AspNetDevelopmentServer type exposes the following members.

Public methodAspNetDevelopmentServerInitializes an instance of the AspNetDevelopmentServer() class by using the provided name, Web application path, and root name of the Web application.

Public propertyNameGets the name of this instance of ASP.NET Development Server.
Public propertyPathToWebAppGets the full path of the Web application that is being tested.
Public propertyWebAppRootGets the name of the root for the Web application that is being tested.

Public methodEqualsReturns a value that indicates whether the current instance of AspNetDevelopmentServer object is equal to the provided instance of the AspNetDevelopmentServer object. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code of the ID of the AspNetDevelopmentServer instance. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLoadLoads the class from the provided XML element.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSaveSaves the ASP.NET Development Environment settings that this class represents.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Use this class to develop tests that you intend to run in the ASP.NET host. This class differs from the following classes, although their names are similar:

  • AspNetDevelopmentServerAttribute specifies the settings that must be used for ASP.NET Development Server for the test. This class is used primarily for Web service unit tests.

  • AspNetDevelopmentServerHostAttribute specifies the settings to use when an ASP.NET Development Server is the host server for the test. This class is used for ASP.NET unit tests.

You can use the Save method to persist this object and the Load method to load it from storage.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions