真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

使用asp.net怎么遍歷Request信息

使用asp.net怎么遍歷Request信息?針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。

創(chuàng)新互聯(lián)公司專注于企業(yè)全網(wǎng)整合營(yíng)銷推廣、網(wǎng)站重做改版、清江浦網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、HTML5建站、成都商城網(wǎng)站開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為清江浦等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

ASP.NET 是什么

ASP.NET 是開源,跨平臺(tái),高性能,輕量級(jí)的 Web 應(yīng)用構(gòu)建框架,常用于通過(guò) HTML、CSS、JavaScript 以及服務(wù)器腳本來(lái)構(gòu)建網(wǎng)頁(yè)和網(wǎng)站。

#需求:

在服務(wù)端獲取從客戶端發(fā)送過(guò)來(lái)的所有數(shù)據(jù)信息;

#方案:

1、服務(wù)端代碼

public void ProcessRequest(HttpContext context)
{
  //打印所有參數(shù)信息
  context.Response.Write("Params:");
  for (int i = 0; i < context.Request.Params.Count; i++)
  {
    context.Response.Write("
  • " + context.Request.Params.Keys[i].ToString() + " = " + context.Request.Params[i].ToString());   }   context.Response.Write("
    ");   //打印form信息   context.Response.Write("Form:");   for (int i = 0; i < context.Request.Form.Count; i++)   {     context.Response.Write("
  • " + context.Request.Form.Keys[i].ToString() + " = " + context.Request.Form[i].ToString());           }   context.Response.Write("
    ");   //打印query信息   context.Response.Write("QueryString:");   for (int i = 0; i < context.Request.QueryString.Count; i++)   {     context.Response.Write("
  • " + context.Request.QueryString.Keys[i].ToString() + " = " + context.Request.QueryString[i].ToString());         }   context.Response.Write("
    ");   //打印cookies信息   context.Response.Write("Cookies:");   for (int i = 0; i < context.Request.Cookies.Count; i++)   {     context.Response.Write("
  • " + context.Request.Cookies.Keys[i].ToString() + " = " + context.Request.Cookies[context.Request.Cookies.Keys[i].ToString()].Value);           }   context.Response.ContentType = "text/html"; }
  • 2、使用postman模擬發(fā)送數(shù)據(jù)

    1)、query_param

    使用asp.net怎么遍歷Request信息

    2)、headers

    使用asp.net怎么遍歷Request信息

    3)、form_param

    使用asp.net怎么遍歷Request信息

    4)、cookies

    使用asp.net怎么遍歷Request信息

    3、返回值

    Params:

    • str = str

    • str1 = str1

    • form_1 = form_1

    • form_2 = form_2

    • ASP.NET_SessionId = 2eln4eqa2uv0hawyks50kfad

    • DisablePoint = true

    • QrcodePrefix =

    • UM = http://192.168.2.121/PsUM

    • MasterVisitor = 19

    • CanRegister = True

    • LoopTime = 10

    • CanDownload = {"1":false}

    • TotalVisitorNum = {"1":6}

    • cookie_test = test

    • ALL_HTTP = HTTP_CACHE_CONTROL:no-cache HTTP_CONNECTION:keep-alive HTTP_CONTENT_LENGTH:278 HTTP_CONTENT_TYPE:multipart/form-data; boundary=--------------------------358496475944465509800748 HTTP_ACCEPT:*/* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_COOKIE:ASP.NET_SessionId=2eln4eqa2uv0hawyks50kfad; DisablePoint=true; QrcodePrefix=; UM=http://192.168.2.121/PsUM; MasterVisitor=19; CanRegister=True; LoopTime=10; CanDownload={"1":false}; TotalVisitorNum={"1":6}; cookie_test=test HTTP_HOST:localhost:3805 HTTP_USER_AGENT:PostmanRuntime/7.3.0 HTTP_HEADER_1:header_1 HTTP_HEADER_2:header_2 HTTP_POSTMAN_TOKEN:1f778868-3222-479a-9863-d65ca4881a2b

    • ALL_RAW = Cache-Control: no-cache Connection: keep-alive Content-Length: 278 Content-Type: multipart/form-data; boundary=--------------------------358496475944465509800748 Accept: */* Accept-Encoding: gzip, deflate Cookie: ASP.NET_SessionId=2eln4eqa2uv0hawyks50kfad; DisablePoint=true; QrcodePrefix=; UM=http://192.168.2.121/PsUM; MasterVisitor=19; CanRegister=True; LoopTime=10; CanDownload={"1":false}; TotalVisitorNum={"1":6}; cookie_test=test Host: localhost:3805 User-Agent: PostmanRuntime/7.3.0 header_1: header_1 header_2: header_2 Postman-Token: 1f778868-3222-479a-9863-d65ca4881a2b

    • APPL_MD_PATH = /LM/W3SVC/34/ROOT

    • APPL_PHYSICAL_PATH = D:\vsproject\Projects\WebApplication1\WebApplication1\

    • AUTH_TYPE =

    • AUTH_USER =

    • AUTH_PASSWORD =

    • LOGON_USER =

    • REMOTE_USER =

    • CERT_COOKIE =

    • CERT_FLAGS =

    • CERT_ISSUER =

    • CERT_KEYSIZE =

    • CERT_SECRETKEYSIZE =

    • CERT_SERIALNUMBER =

    • CERT_SERVER_ISSUER =

    • CERT_SERVER_SUBJECT =

    • CERT_SUBJECT =

    • CONTENT_LENGTH = 278

    • CONTENT_TYPE = multipart/form-data; boundary=--------------------------358496475944465509800748

    • GATEWAY_INTERFACE = CGI/1.1

    • HTTPS = off

    • HTTPS_KEYSIZE =

    • HTTPS_SECRETKEYSIZE =

    • HTTPS_SERVER_ISSUER =

    • HTTPS_SERVER_SUBJECT =

    • INSTANCE_ID = 34

    • INSTANCE_META_PATH = /LM/W3SVC/34

    • LOCAL_ADDR = ::1

    • PATH_INFO = /test.ashx

    • PATH_TRANSLATED = D:\vsproject\Projects\WebApplication1\WebApplication1\test.ashx

    • QUERY_STRING = str=str&str1=str1

    • REMOTE_ADDR = ::1

    • REMOTE_HOST = ::1

    • REMOTE_PORT = 12131

    • REQUEST_METHOD = POST

    • SCRIPT_NAME = /test.ashx

    • SERVER_NAME = localhost

    • SERVER_PORT = 3805

    • SERVER_PORT_SECURE = 0

    • SERVER_PROTOCOL = HTTP/1.1

    • SERVER_SOFTWARE = Microsoft-IIS/10.0

    • URL = /test.ashx

    • HTTP_CACHE_CONTROL = no-cache

    • HTTP_CONNECTION = keep-alive

    • HTTP_CONTENT_LENGTH = 278

    • HTTP_CONTENT_TYPE = multipart/form-data; boundary=--------------------------358496475944465509800748

    • HTTP_ACCEPT = */*

    • HTTP_ACCEPT_ENCODING = gzip, deflate

    • HTTP_COOKIE = ASP.NET_SessionId=2eln4eqa2uv0hawyks50kfad; DisablePoint=true; QrcodePrefix=; UM=http://192.168.2.121/PsUM; MasterVisitor=19; CanRegister=True; LoopTime=10; CanDownload={"1":false}; TotalVisitorNum={"1":6}; cookie_test=test

    • HTTP_HOST = localhost:3805

    • HTTP_USER_AGENT = PostmanRuntime/7.3.0

    • HTTP_HEADER_1 = header_1

    • HTTP_HEADER_2 = header_2

    • HTTP_POSTMAN_TOKEN = 1f778868-3222-479a-9863-d65ca4881a2b


      Form:

    • form_1 = form_1

    • form_2 = form_2


      QueryString:

    • str = str

    • str1 = str1


      Cookies:

    • ASP.NET_SessionId = 2eln4eqa2uv0hawyks50kfad

    • DisablePoint = true

    • QrcodePrefix =

    • UM = http://192.168.2.121/PsUM

    • MasterVisitor = 19

    • CanRegister = True

    • LoopTime = 10

    • CanDownload = {"1":false}

    • TotalVisitorNum = {"1":6}

    • cookie_test = test

    關(guān)于使用asp.net怎么遍歷Request信息問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開,可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。


    網(wǎng)頁(yè)標(biāo)題:使用asp.net怎么遍歷Request信息
    文章位置:http://weahome.cn/article/geecps.html

    其他資訊

    在線咨詢

    微信咨詢

    電話咨詢

    028-86922220(工作日)

    18980820575(7×24)

    提交需求

    返回頂部