Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AspNetDevelopmentServerAttribute Class

 

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

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting.Web
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.TestTools.UnitTesting.Web.AspNetDevelopmentServerAttribute

[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = true)>]
type AspNetDevelopmentServerAttribute = 
    class
        inherit Attribute
    end

NameDescription
System_CAPS_pubmethodAspNetDevelopmentServerAttribute(String, String)

Initializes a new instance of the AspNetDevelopmentServerAttribute class with the server name and the path to the Web application.

System_CAPS_pubmethodAspNetDevelopmentServerAttribute(String, String, String)

Initializes a new instance of the AspNetDevelopmentServerAttribute class with the server name, the path to the Web application, and the Web application root.

NameDescription
System_CAPS_pubpropertyName

Gets the name of the ASP.NET Development Server.

System_CAPS_pubpropertyPathToWebApp

Gets the path to the Web application.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

System_CAPS_pubpropertyWebAppRoot

Gets the Web application root.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

When you run a test with an AspNetDevelopmentServerAttribute, an ASP.NET Development Server instance is started. You can then use TryUrlRedirection to redirect a Web service object so it points to that server instead of what is defined in the Web reference. By pointing to the server, you can ensure that an ASP.NET Development Server site is started and at a known URL when you run a Web service test.

This attribute targets methods. Multiple instances of this attribute may be applied to a method.

For more information about how to use attributes, see Extending Metadata Using Attributes.

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

Return to top
Show: