是否可以在 ASP.NET 中直接写入/读取 TCP 流?

发布于 2024-09-28 07:42:06 字数 159 浏览 0 评论 0原文

我想直接写入和读取 TCP 流,而不需要 ASP 或 IIS 进行任何修改。这可能吗?

编辑:目标是提供程序和服务器之间的通信。每个连接之间的数据交换少于 25 个字节(默认情况下)。因此标头会导致比实际数据更多的流量。我需要使用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

春风十里 2024-10-05 07:42:06

即使在 IIS 7.0 中,ASP.NET 具有新的集成模式,默认情况下也不会向 ASP.NET 应用程序显示底层套接字。我不确定是否有任何黑客或第三方。我认为作为使用 HttpContextResponse 对象的 Web 服务器(IIS 7.0)和 Web 开发工具(ASP.NET),您可以做很多事情,例如访问底层输出流通过 Response.OutputStream 或通过调用 Response.Close() 关闭套接字。

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.

等待圉鍢 2024-10-05 07:42:06

当然,请尝试阅读本教程,为您提供使用 TCP/IP 套接字的概述。

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

憧憬巴黎街头的黎明 2024-10-05 07:42:06

ASP.NET 是构建在 .NET 平台上的 Web 框架。

您所要求的不需要 Web 框架。您可以使用普通的旧 .NET 完成所需的一切,而无需使用任何 ASP.NET 组件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文