The difference between ASP. NET Request, Request.Form, Request.QueryString

Source: Internet
Author: User
Tags servervariables server port metabase

Request.Form: Gets the data submitted by post (receives the data submitted by the Form);

Request.QueryString: Gets the Address bar parameter (data submitted in get mode)

Request: Contains both of the above methods (the first to get the data submitted by get mode), it will be in QueryString, Form, servervariable search again.

And sometimes they get different results. If you only need one of the data in the Form, but you use the request instead of the Request.Form, then the program will be searched again in querystring and ServerVariable. If you have the same name in your querystring or servervariable, you will not get the value you originally wanted.

Various parameters in the Request.ServerVariables

Request.ServerVariables ("Url")
Return server address

Request.ServerVariables ("Path_info")
Path information provided by the client

Request.ServerVariables ("Appl_physical_path")
The physical path corresponding to the application metabase path

Request.ServerVariables ("path_translated")
Paths obtained from virtual to physical mapping

Request.ServerVariables ("Script_name")
Name of the execution script

Request.ServerVariables ("Query_string")
Query string content

Request.ServerVariables ("Http_referer")
The requested string content

Request.ServerVariables ("Server_port")
Server port number to accept requests

Request.ServerVariables ("REMOTE_ADDR")
IP address of the remote host making the request

Request.ServerVariables ("Remote_host")
The name of the remote host that made the request

Request.ServerVariables ("Local_addr")
Returns the address of the server accepting the request

Request.ServerVariables ("Http_host")
Return server address

Request.ServerVariables ("SERVER_NAME")
Host name, DNS address, or IP address of the server

Request.ServerVariables ("Request_method")
Methods of making requests such as, post, etc.

Request.ServerVariables ("Server_port_secure")
1 if the server port that accepts the request is a secure port, otherwise 0

Request.ServerVariables ("Server_protocol")
The name and version of the protocol used by the server

Request.ServerVariables ("Server_software")
Name and version of the server software that answered the request and ran the gateway

Request.ServerVariables ("All_http")
All HTTP headers sent by the client, prefixed by HTTP_

Request.ServerVariables ("All_raw")
All HTTP headers sent by the client, with the same results as when the client was sent, without a prefix http_

Request.ServerVariables ("Appl_md_path")
Metabase path for the application

Request.ServerVariables ("Content_length")
The length at which the client emits the content

Request.ServerVariables ("Https")
If the request crosses the secure channel (SSL), returns on if the request is from a non-secure channel, the off

Request.ServerVariables ("instance_id")
ID number of the IIS instance

Request.ServerVariables ("Instance_meta_path")
Metabase path of the IIS instance responding to the request

Request.ServerVariables ("http_accept_encoding")
Return to content such as: gzip,deflate

Request.ServerVariables ("Http_accept_language")
Back to content such as: en-US

Request.ServerVariables ("Http_connection")
Back to content: keep-alive

Request.ServerVariables ("Http_cookie")
Return to content such as: nvisit%

2dyum=125; Aspsessionidcartqtra=fdobffabjgoecbbkhkgpfiji; Aspsessionidcaqqtsrb=lkjjplababillpcogjgamkam; Aspsessionidacrrssra=dk

Hhhfbbjojcconpphlkghpb

Request.ServerVariables ("Http_user_agent")
Back to content: mozilla/4.0 (compatible; MSIE6.0; WindowsNT5.1; SV1)

Request.ServerVariables ("Https_keysize")
The number of bits of the Secure Sockets Layer connection key, such as 128

Request.ServerVariables ("Https_secretkeysize")
The server verifies the number of bits of the private keyword, such as 1024

Request.ServerVariables ("Https_server_issuer")
Publisher field of the server certificate

Request.ServerVariables ("Https_server_subject")
Subject field of the server certificate

Request.ServerVariables ("Auth_password")
When you use Basic authentication mode, the password that the customer enters in the password dialog box

Request.ServerVariables ("Auth_type")
When a user accesses a protected script, the server is used to verify the user's authentication method

Request.ServerVariables ("Auth_User")
User name of the certificate

Request.ServerVariables ("Cert_cookie")
Unique Client Certificate ID number

Request.ServerVariables ("Cert_flag")
Client certificate, if there is a client certificate, BIT0 is 0 if the client certificate validation is not valid, Bit1 is set to 1

Request.ServerVariables ("Cert_issuer")
The Publisher field in the user certificate

Request.ServerVariables ("Cert_keysize")
The number of bits of the Secure Sockets Layer connection key, such as 128

Request.ServerVariables ("Cert_secretkeysize")
The server verifies the number of bits of the private keyword, such as 1024

Request.ServerVariables ("Cert_serialnumber")
Serial Number field for the customer certificate

Request.ServerVariables ("Cert_server_issuer")
Publisher field of the server certificate

Request.ServerVariables ("Cert_server_subject")
Subject field of the server certificate

Request.ServerVariables ("Cert_subject")
The subject field of the client certificate

Request.ServerVariables ("Content_Type")
Data type of form content or httpput sent by the customer

The difference between ASP. NET Request, Request.Form, Request.QueryString (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.