WebSiteProperties.VsWebServerPort Property

Gets or sets the current port number for the ASP.NET Development Server.

Namespace:  VsWebSite
Assembly:  VsWebSite.Interop (in VsWebSite.Interop.dll)

Syntax

'Declaration
Property VsWebServerPort As UShort
ushort VsWebServerPort { get; set; }
property unsigned short VsWebServerPort {
    unsigned short get ();
    void set (unsigned short value);
}
abstract VsWebServerPort : uint16 with get, set
function get VsWebServerPort () : ushort 
function set VsWebServerPort (value : ushort)

Property Value

Type: System.UInt16
The current port number for the Web server if the Web site is configured to use the ASP.NET Development Server and if the EnableVsWebServer property is true; otherwise, 0 (zero).

Remarks

If the ASP.NET Development Server is configured to use dynamic ports, the value of the VsWebServerPort property could change. Setting this property may have unexpected results if the specified port is already in use.

Examples

For an example of reading and setting late-bound properties, see WebSiteProperties.

.NET Framework Security

See Also

Reference

WebSiteProperties Interface

VsWebSite Namespace

EnableVsWebServer

EnvDTE

WebSiteProperties

Other Resources

Referencing Automation Assemblies and the DTE2 Object