HttpWebRequest 支持命名管道吗?
对于所有 .NET 专家,我有一个问题要问你们。
我需要在 Windows 上使用 C# 通过命名管道执行 SOAP/HTTP。 (这是针对使用 RPC 的 SOAP 与 Python 库/服务器进行通信的客户端。使用套接字/端口被认为是不安全的,并且端口配置变得很麻烦。)有两个问题。
有一个 HttpWebRequest 类,但它只支持 http URI。我找不到任何简单的方法来更改它以支持命名管道。有什么想法吗?
理论上,我可以子类化 WebRequest,但我不想仅仅为了获得命名管道支持而用 C# 重写所有 HTTP 协议。有一个 PipeStream 类,但仅在 .NET 3.5 及更高版本上受支持。我的东西必须与 .NET 2.0 配合使用……
我尝试在谷歌和这个网站上搜索。 HttpWebRequest 与命名管道结合使用的点击量非常少(实际上没有相关的点击量)(尽管每个主题本身都有很多点击量)。
任何建议表示赞赏,谢谢。
To all the .NET experts, I have a question for you.
I need to do SOAP/HTTP over named pipes on Windows, in C#. (This is for a client talking to a Python library/server using SOAP for RPC. Using socket/port was deemed both insecure, and port configuration becomes a hassle.) There are two problems.
There is an HttpWebRequest class, but it only supports http URI’s. I can’t find any easy way to change it to support named pipes. Any ideas?
In theory, I could subclass WebRequest, but I don't want to have to rewrite all of the HTTP protocol in C# just to get named pipe support.There is a PipeStream class, but it is only supported on .NET 3.5 and above. My stuff has to work with .NET 2.0….
I tried searching on google and on this site. There are very few hits (actually, no relevant ones) for HttpWebRequest in combination with named pipes (though each topic by itself has lots of hits).
Any advice is appreciated, thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您看过 Windows Communication Foundation (WCF) 吗?支持 NamedPipes 作为 SOAP 请求的传输
Have you looked at Windows Communication Foundation (WCF)? That has support for NamedPipes as a transport for SOAP requests