如何在asp.net中接收HTTP回调请求并发送正确的响应. [英] How to receive the HTTP Callback request and send ok response to that in asp.net.

查看:345
本文介绍了如何在asp.net中接收HTTP回调请求并发送正确的响应.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp.net中接收HTTP回调请求并发送对该请求的OK响应.

谁能为此提供示例示例或参考链接.

谢谢.

How to receive the HTTP Callback request and send OK response to that request in asp.net.

Can anyone provide me sample example or reference links for this.

Thanks.

推荐答案

响应请求意味着具有处理程序,即,在老式ASP.net中具有正确名称的脚本,或在MVC中具有控制器方法. . IE.如果要向yourdomain.com/somepage.aspx?queryparam=1提交请求,则需要编写somepage.aspx进行处理.在MVC中,如果您提交到yourdomain.com/Ajax/MyMethod?queryparam=whatever,则需要具有MyMethod HTTP可见方法的AjaxController.

发送未明确设置为错误页面的任何响应将导致HTTP 200(确定).
Responding to a request means having a handler for it, i.e. a script with the right name in old school ASP.net, or a controller method in MVC. I.e. if you are submitting a request to yourdomain.com/somepage.aspx?queryparam=1, you need to write a somepage.aspx to handle it. In MVC if you submit to yourdomain.com/Ajax/MyMethod?queryparam=whatever then you need an AjaxController with a MyMethod HTTP visible method.

Sending any response that you haven''t explicitly set to be an error page will result in a HTTP 200 (OK).


这篇关于如何在asp.net中接收HTTP回调请求并发送正确的响应.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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