Is it possible to write / read TCP streams directly in ASP.NET?

I would like to write and read TCP streams directly without any changes to ASP or IIS. Is it possible?

Edit: The goal is to provide communication between the program and the server. The exchange of data between them is less than 25 bytes per connection (in the default case). Thus, headers will cause more traffic than real data. I need to use ASP.Net because the server owner will not let me run my programs.

+3
source share
3 answers

ASP.NET even in IIS 7.0 with it, the new integrated mode by default does not show the base socket for your ASP.NET application. I am not sure if there is a hack or a third party. I think that as a web server (IIS 7.0) and a web development toolkit (ASP.NET) using objects HttpContext, Responsethere are many things that you can do, for example, access the underlying output stream through Response.OutputStreamor close the socket by calling Response.Close().

+1
source

Of course, try reading this tutorial to give you a scheme for using TCP / IP sockets.

+1
source

ASP.NET - -, .NET.

, , -. , , .NET - ASP.NET.

0
source

Source: https://habr.com/ru/post/1770909/


All Articles