1

I am writing web application on asp.net and want to run TcpListener on the background script.

Actually everything is simple: Server or TcpListener will run on some concrete static IP address, and on 2000 port (it is not in use anywhere), and wait for client. Client is some application with TcpClient which will connect to server. I write such working applications on C#. So I just implement such app in background C# code. In the most of answers here it is problem of port or IP, but in my case, these staff is OK.

Server is running on this IP, because I cant start another such kind of application on this IP. But this TcpListener do not accepting incoming connections.

I am beginner in ASP.net and will be happy if you can help me. Thank you in advance.

  • 1
    Can you telnet to that port? If not, it is a network problem. Not a .NET problem. – usr Aug 23 '14 at 13:36
  • Yes, I can. I am completely sure that this is not a network problem. – Nikhanbayev Nursultan Aug 23 '14 at 13:39
  • If you can telnet, then that port must be open and a connection have been accepted. How do you know that no connection was accepted? Make 100% sure. – usr Aug 23 '14 at 13:40
  • 1
    I put some checkers. It starts to listening but when I start client nothing happens. You know absolutely similar code but written in C# is working without any problems. But when I try it in ASP I dont know why it is not working. Thank you for interest :) – Nikhanbayev Nursultan Aug 23 '14 at 13:49
  • Interesting..see if [this helps](http://stackoverflow.com/q/3188618/304683) re: IIS setup. – EdSF Aug 23 '14 at 17:09

0 Answers0