从 ASP .net Web 服务向 CGI 页面发送和接收数据
如何将数据从 .net Web 服务发送到 CGI 页面并收集响应?
这是一个整合项目。 一侧(客户端A)正在收集Windows应用程序+Sql服务器中的服务请求。另一方(客户端 B)提供服务,但是他们可以接受来自 cgi url http:// /mysite.com/cgi-bin/process.cgi(假网址)。
现在我必须编写一个桥(.net Web 服务),它从 Windows 应用程序启动并将数据提交到 CGI url。
我是一名网络技术新手,非常感谢详细的解释。
例如 在 HTML 页面中,我可以像下面指定的那样执行
<form method="post" action="https://mysite.com/cgi-bin/process.cgi">
<input type="hidden" name="action" value="sale">
<input type="hidden" name="acctid" value="TEST0">
<input type="hidden" name="name" value="Customer">
<input type="hidden" name="phnum" value="5454545454545454">
<input type="submit">
</form>
如何在 .net Web 服务中执行此操作。 谢谢
How can I send data from my .net web service to a CGI page and collect response?
It is an integration project.
One side (Client A) is collecting service requests in windows application + Sql server. another side (Client B) provides the services however they can accept the request from a cgi url http://mysite.com/cgi-bin/process.cgi (fake url).
Now I have to write a bridge (.net web service), which get initiated from windows app and submits data to the CGI url.
I am a novice web technician, detailed explanation is much appreciated.
e.g.
In an HTML page I can do like specified below
<form method="post" action="https://mysite.com/cgi-bin/process.cgi">
<input type="hidden" name="action" value="sale">
<input type="hidden" name="acctid" value="TEST0">
<input type="hidden" name="name" value="Customer">
<input type="hidden" name="phnum" value="5454545454545454">
<input type="submit">
</form>
How to do it in .net Web Service.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CGI 只是 HTTP 服务器的扩展。它仅取决于针对给定请求使用哪个 CGI 的服务器配置。所以你不能直接调用CGI - 你调用一个HTTP服务器,然后服务器才将调用传输到CGI并设置完成CGI扩展请求所需的环境变量。
CGI is just an HTTP server extension. It solely depends on the server configuration which CGI to use for given request. So you can not directly call CGI - you call a HTTP server and server only then transmits a call to CGI and sets environment variables needed to complete request by CGI extension.