Checking Open Ports for an Infor CRM Web Server

It’s a common scenario where an Infor CRM server in the DMZ needs to communicate with the Infor CRM application server and SQL server inside the network. In these cases, usually there is a need to open the necessary ports to allow the communication from the server in the DMZ to the servers inside the network. You can use the code below to test this and confirm that the needed ports are indeed open.

To use the code:

  1. Copy the code to a text file
  2. Change the value for serverAddress to the server you want to test a connection to, such as the Infor CRM application server or SQL server
  3. Save as test.aspx in the root of the website
  4. Open your browser to http://<websiteroot>/test.aspx (obviously, where <websiteroot> is something valid for the server, such as localhost, an IP address or DNS name)
  5. View the results 🙂
<% @Page Language="C#" Debug="True" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Net.Sockets" %>

<%

var serverAddress = "10.10.1.45";
var portsToCheck = new int[] {1433, 1706};

foreach (var port in portsToCheck)
{
	using(var tcpClient = new TcpClient())
	{
		try 
		{
			tcpClient.Connect(serverAddress, port);
			Response.Write("Port " + port + " is open");
		} 
		catch 
		{
			Response.Write("Port " + port + " is NOT open");
		}
	}
}

%>
ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!