来自控制台应用程序的webresponse [英] webresponse from console application

查看:94
本文介绍了来自控制台应用程序的webresponse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个asp.net代码,网络服务器将从外部设备(生物识别)获取请求并回复设备Response.Output.Write(OK);。



现在我正试图从控制台应用程序做同样的事情。我正在使用HttpServer从设备获取Web请求。现在我只想将web响应回到像asp这样的设备上。



提前谢谢

Hi,

I'm having a asp.net code, that the web server will get the request from a external device(biometric) and response back to the device by "Response.Output.Write("OK");".

Now I'm trying to do the same from console application. I'm getting the web request from device using HttpServer. Now I just want to web response back to the device like asp.

Thanks in advance

推荐答案

你的问题不是很清楚,但也许你需要研究 HttpWebRequest的 [ ^ ]和 HttpWebResponse [ ^ ] classes。
Your question is not very clear, but perhaps you need to investigate the use of HttpWebRequest[^] and HttpWebResponse[^] classes.


生物识别设备不断发送一些请求,如http:// localhost:8080 / biocdta?SN = 123 ....

然后必须得到查询参数,并根据一些条件我必须回复去德副好。然后设备和数据库将连接。现在的问题是如何从控制台应用程序回复设备。



在php中只需回显OK;设备会接受。因为它正在发回网络回复。



我需要在控制台中。
The biometric device continously sending some request like http://localhost:8080/biocdta?SN=123....
then have to get the query parameters and based on some condition i have to response back to the device as "OK". Then the device and db will connect. Now the problem is how to respond back to the device from console application.

In php by simply echo "OK"; device will accept that. As because it's sending back web response.

Same i need in console.


这篇关于来自控制台应用程序的webresponse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆