开发者

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

I'd like to write and read TCP Streams directly without any modifications by ASP or IIS. Is this possible?

Edit: Goal is to provide communication between a program and a server. Data exchange between them is less then 25 bytes per connection (in default case). So Headers will cause more traffic then the real data开发者_如何学运维. I need to use ASP.Net because the owner of the server will not let me execute my programs.


ASP.NET even in IIS 7.0 with it's new integrated mode doesn't reveal the underlying socket to your ASP.NET application by default. I'm not sure if there's any hack or third party out there. I think as a web server (IIS 7.0) and web development tool (ASP.NET) using HttpContext and Response objects there are many things you can do like accessing underlying output stream via Response.OutputStream or closing the socket by calling Response.Close() as well.


Sure, try reading this tutorial to give you an outline of using TCP/IP sockets.


ASP.NET is a Web Framework built on the .NET Platform.

What you are asking for doesn't need a Web Framework. You can accomplish everything you need using plain old .NET without using any ASP.NET components.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜