IdeaBlade DevForce 2010 Help Reference
ServerPort Property
See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core.Configuration Namespace > ServiceKeyElement Class : ServerPort Property



Gets or sets the server port that is listening for client requests - Applicable to both client and server.

Syntax

Visual Basic (Declaration) 
<XmlAttributeAttribute("serverPort")>
<DescriptionAttribute("The server port that is listening for client requests - Applicable to both client and server.")>
<DefaultValueAttribute()>
Public Property ServerPort As Integer
Visual Basic (Usage)Copy Code
Dim instance As ServiceKeyElement
Dim value As Integer
 
instance.ServerPort = value
 
value = instance.ServerPort
C# 
[XmlAttributeAttribute("serverPort")]
[DescriptionAttribute("The server port that is listening for client requests - Applicable to both client and server.")]
[DefaultValueAttribute()]
public int ServerPort {get; set;}
C++/CLI 
[XmlAttributeAttribute("serverPort")]
[DescriptionAttribute("The server port that is listening for client requests - Applicable to both client and server.")]
[DefaultValueAttribute()]
public:
property int ServerPort {
   int get();
   void set (    int value);
}

Remarks

This value must be the same for both Client and Server configurations.

The final endpoint address is formed is formed from the RemoteBaseUrl, ServerPort and ServiceName properties. For example, if the endpoint address is http://localhost:9009/myapp/EntityService.svc, then the ServerPort would be "9009". If the service is hosted under IIS with an address such as http://localhost/MyService/EntityService.svc, then the ServerPort will be 80.

If hosting the application server with either the ServerService or ServerConsole, you will probably need to manually open the port used by your service. If using Windows Firewall, use the "Add Port" button on the Exceptions tab. Be sure to choose a TCP port even if you’re using the HTTP protocol.

The ServerPort, RemoteBaseUrl and ServiceName values are ignored by the application server when hosted by IIS. These values are also not requred when endpoint configuration information can be obtained from the system.serviceModel section of the client's configuration file.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.