I'm trying开发者_运维知识库 to send a message to a specific IP/Port and receive a reply in an ASP.net website, i tried the method describd at the following link but it didn't work for me as you can see : https://stackoverflow.com/questions/6022407/socketexception-an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its
is there any ideas to solve this problem,or any other ways to achieve this
Thank you very much , i really appreciate your help
Use TcpClient or Socket classes.
The first one is simpler and basically is a wrapper around the second one.
You probably just need WebRequest. It is even simpler, if it meets your needs of course.
精彩评论