.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Pinging a port

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :.NET Framework

View Complete Post

More Related Resource Links

bluetooth print via serial port PDA

Print via BlueTooth using PDA

Parallel port complete: programming, interfacing & using the PC's parallel

Parallel port complete: programming, interfacing & using the PC's parallel


Serial Port Communication Read and Write using C#.net

In this simple article you will learn that how you can Open and read COM port data using System.IO.Ports Namespace.
Simply just create New Project of windows application in C#.

Import ServiceProcess APIs
using System.IO.Ports

Imports System.IO.Ports

Write Parsing functions which parse port data according to attached device

localhost is not set up to establish a connection on port 51624 with this computer


I'm trying to run asp.net locally, but getting the error

localhost is not set up to establish a connection on port 51624 with this computer

How can I fix it?

Can a WCF service listen to TCP port??


Hello everyone,

need your replies as early as possible.

I have to develop a WCF Service which should listen to a particular TCP port for data coming in from clients. Is there a way wherein the client need not call any WCF Service methods, instead client can directly write data to that port and WCF listens to TCP port for data.

Prompt reply will be highly appreciated... Thanks!


IIS - sharepoint/default website port number confusion



I have MOSS 2007 installed with IIS V7.

My default web site port is 80. When I created a new web application for my main sharepoint portal I also set it to 80. So obviously now the default web site port shows as stopped in IIS and it won't start.

What are the best practices. Should I change the port number for my portal to something else? I mean is it even a good idea to have sharepoint on port 80? If so, how do I go about changing the port number for my portal site?

any help appreciated.

Serial Port with portable data terminal

Hi,I am making application with portable data terminal which connected to serial port. User will go with portable data terminal and scan data with it than we will connect it to PC and read all the data from it. Kindly somebody help me how to do that.Thanx

Can't bind a UDP socket to a port

using System; using System.Net; using System.Net.Sockets; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int port = 11000; Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPEndPoint ipendpoint = new IPEndPoint(IPAddress.Any, port); try { socket.Bind(ipendpoint); Console.WriteLine("Successfully bound to port " + port); } catch (SocketException e) { Console.WriteLine("Winsock error: " + e.ErrorCode.ToString() + ", " + e.Message.ToString()); } Console.Read(); } } } I get the error code [b]10022[/b] when trying to bind the UDP socket, which is "Invalid argument specified". This is the same for all the UDP server examples on the internet at the binding stage, as well as the MSDN one. It will work if the port is 0, but not if the port is anything but 0. TCP binding works fine, and I can make a UDP server on any port with Java (the binding works fine) but in C# it gives me this error. The code works for everyone I've asked to try it, and I've got the latest NET framework (version 4) and Windows XP with SP3 so I know the commands are supported by the OS (also, Visual C# 2010 Express and 2008 Express both give this error). Any ideas to fix it?

How to wait for a Serial Port to respond

Hi Is it to possible to wait for a serialPort component to complete it's response?  I have a device connected to the serial port of my PC. I use the serialPort component in order to communicate with the device. I have to send 2 different strings of data to the serial port but the trick is that after sending the first string of data I have to wait for the serial port to respond. Then I have to check the response and decide whether I must send the second string or not. Also after sending the second string, I have to check also the response of the serial port. I tried to use an arbitrary amount of wait time between the sending of the two strings. Something like SerialPort.Write(...) ; Thread.Sleep(2000); SerialPort.Write(...); But the software failed when I tried it in a slower PC. So is there a way to replace the Thread.Sleep(2000) with a command that will wait until the serial port complete its response? Although, the response of the serial port is different between the two sending strings, I do know that the first response is only one byte and I know the ending byte of the second response. Also, the second response is no more than 30 bytes in length. Regards Dimitris

Ping IpAddress with Port number?

I am using System.Net.NetworkInformation with Ping method.   But it seems like it can only ping IPAddress. What should I need to do if I need to find out whether a port of the IPaddress is available?   Let me know. I will reward you.   Thanks

Specify Instance Port Number on Command Line Install

Is there a way to specify which port we want our named SQL Express instance to run on during a command line install with no interaction from the user?  If not, is there a way we can change the dynamic port selected after the install without any user interaction?Nick's Programming Tips

Change Port No

I have some API and repactha control in my web application which communicate from port no 80.I am using shared hosting provided by Reseller Club and they have blocked port no 80 for outgoing communication. They asked me to send request from port no 53,25,1433How can i do that?

What steps to enable My Sites to be accessed externaly when it uses port 9000 and not 80

Hi, Running Sharepoint 2010, Windows server 2008 R2, ISA server 2005. I have two web application running on different ports "Home" running on port 80 and "My Sites" running on port 9000. I have enabled the "Home" site (port 80) to be accessed through the ISA server so users can log in remotely and now have to do the same for the "My Sites" (running on port 9000) but am unsure of what steps i have to take since it is using a different port. Will I have problems with users accessing this from Hotels, cafes etc since this port isn't open or is all the traffic directed through port 80. Do I need to open this port on my firewall? Is this all taken care in Alternate access mapping? Any help would be appreciated.  

How to setup port forwarding for SharePoint server on home network

I have a SharePoint 2010 server running on my home network.  I want to be able to access the server from the internet and edit pages, create sites etc.  The web applications is running on a specific port (1234) not port 80. I've configured my router to forward port 1234 to the server's IP address and I can access the site fine from the internet using the routers IP address and adding the port number.  Viewing the site works fine but the problem is when I try to access a page in the _layouts folder for any of the sub sites I get a "File not found" error.  Also, if I go to a sub site and create a new site (no _layouts page required) it works but the new site is created directly under the root and not the sub site. It seems that the port forwarding from the router is messing up the context for the _layouts folder.  Is there any way around this? Thanks.

Using a Port for WCF chat application

Hi All. I have a chat project using WCF over the internet. I will user TCPbinding for it. I will choose a port for connect from client. Anybody suggest me choose  the best port for me  ? Thanks so much!  

Visual studio 2005 - Port Number is difference during run time.

Hi, When I debug(F5), the port number display in the URL is difference from the ASP.net development server. Eg: URL address port number is  - 1084, while for the Server is 1088 I have tried difference ways such as trying to set the dynamic port to false, so that I can configure my own port, but it is not able to work. I have also turned off the ESet Firewall however the port number is still difference.  Need your help in this area.. Thank you! 

Use Report Builder 3.0 with SharePoint site using a port number

We are currently working with SSRS R2 and SharePoint 2010.  SharePoint 2010 has been deployed a multitenant solution.  SharePoint and SSRS are on separate servers.  We have successfully integrated the two products but are experiencing some anomolies.  The SharePoint site we are deploying to uses a port number (e.g. http://mysharepointsvr:2222).  When you launch Report Builder from this site, it does not open connected to a Report Server.  When you try to connect to a Report Server the obvious choice is to put in http://mysharepointsvr:2222 for the Report Server service.  However, this does not work.  We are getting the following error: Connection Failed.  Unable to connect to the server that is specified in the URL, 'http://mysharepointsvr:2222'.  Make sure the server is running, the URL is correct, and you have permission to use the server. However, if we use the SharePoint address without the port number it will connect.  This does not work as the SharePoint port determines which site we are directed to for resources.  In our case, we need to be able to browse the folders on port 2222 not port 80 (default).  As far as the error above is concerned, we are able to browse to the report server (http://sql101/reportserver) and see all of the SharePoint sites.  In all cases, identical credentials are being u
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend