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
ushort VsWebServerPort { get; set; }
property unsigned short VsWebServerPort {
unsigned short get();
void set(unsigned short value);
}
abstract VsWebServerPort : uint16 with get, set
Property VsWebServerPort As 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.
See Also
EnableVsWebServer
EnvDTE
WebSiteProperties
VsWebSite Namespace
Referencing Automation Assemblies and the DTE2 Object
Return to top