简体   繁体   English

在不提供网页的情况下在ASP.NET中处理Web请求

[英]Processing a web request in ASP.NET without serving a web page

Following is my problem scenario. 以下是我的问题场景。

I have an ip address 1.2.3.4 我有一个IP地址1.2.3.4

My client will make a webrequest like : http://1.2.3.4/aaa&bbb&ccc 我的客户将发出如下Web请求: http : //1.2.3.4/aaa&bbb&ccc

I need to capture this request and instead of serving a web page I want to do something with the "aaa&bbb&ccc" part. 我需要捕获此请求,而不是提供网页,我想在“ aaa&bbb&ccc”部分中做一些事情。

This process will keep looping. 此过程将继续循环。

I know how to host a website or a web service on IIS. 我知道如何在IIS上托管网站或Web服务。 My confusion is, how do I receive the request on my IP and instead of serving a webpage, just eat it up and 'digest' it. 我的困惑是,我如何在我的IP上接收请求,而不是提供网页,而是吃掉它并“消化”它。 I will have IIS 7 as the web server and ASP.Net/C# as my dev environment. 我将以IIS 7作为Web服务器,并以ASP.Net/C#作为我的开发环境。

How do I do this? 我该怎么做呢? (Would using a RESTFull ASP web service be a good practice?) (使用RESTFull ASP Web服务会是一个好习惯吗?)

Sincere thanks and regards. 真诚的感谢和问候。

Actually you are looking for Web Service , which grab a request from client(can be in static IP & method name), and do what ever developer wants with the entrance parameters( without have to serve a page ). 实际上,您正在寻找Web Service ,它可以从客户端获取请求(可以使用静态IP和方法名),并且可以执行开发人员想要的带有入口参数的任何操作( 而无需提供页面 )。 you can read this for more informations Getting raw soap data from a web reference client running in asp.net 您可以阅读以获取更多信息。 从在asp.net中运行的Web参考客户端获取原始肥皂数据

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM