当前位置: 首页 > 编程日记 > 正文

C#中Request.servervariables参数

整理一下,我在asp.net下遍历的Request.servervariables这上集合,得出的所有参数如下:

Request.ServerVariables["ALL_HTTP"]

客户端发送的http所有报头信息

返回例:HTTP_CACHE_CONTROL:max-age=0 HTTP_CONNECTION:keep-alive HTTP_ACCEPT:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 HTTP_ACCEPT_CHARSET:GBK,utf-8;q=0.7,*;q=0.3 HTTP_ACCEPT_ENCODING:gzip,deflate,sdch HTTP_ACCEPT_LANGUAGE:zh-CN,zh;q=0.8 HTTP_HOST:localhost:4988 HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.519.0 Safari/534.7

Request.ServerVariables["ALL_RAW"]:

检索未处理表格中所有的标题。ALL_RAW 和 ALL_HTTP 不同,ALL_HTTP 在标题文件名前面放置 HTTP_ prefix,并且标题名称总是大写的。使用 ALL_RAW 时,标题名称和值只在客户端发送时才出现。

返回例::Cache-Control: max-age=0 Connection: keep-alive Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3 Accept-Encoding: gzip,deflate,sdch Accept-Language: zh-CN,zh;q=0.8 Host: localhost:4988 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.519.0 Safari/534.7

 Request.ServerVariables["APPL_MD_PATH"]:检索 ISAPI DLL 的 (WAM) Application 的元数据库路径。
 Request.ServerVariables["APPL_PHYSICAL_PATH"]:

检索与元数据库路径相应的物理路径。IIS 通过将 APPL_MD_PATH 转换为物理(目录)路径以返回值。我的理解就是放在的物理路径:

返回例:d:/myfiles/net/Demo12/

 Request.ServerVariables["AUTH_TYPE"]:

用户访问受保护的脚本时,服务器用于检验用户的验证方法。

返回例:NTLM(ntlm身份)

 Request.ServerVariables["AUTH_USER"]:

未被鉴定的用户

返回例:20080909-1520/Administrator

 Request.ServerVariables["AUTH_PASSWORD"]:输入到客户端的鉴定对话中。只有使用基本鉴定时,该变量才可用
 Request.ServerVariables["LOGON_USER"]:

当前登陆用户的用户名(必须在IIS的目录安全性中使用集成Windows验证(取消匿名访问))

返回例:20080909-1520/Administrator

 Request.ServerVariables["REMOTE_USER"]:

用户发送的未映射的用户名字符串。该名称是用户实际发送的名称,与服务器上验证过滤器修改过后的名称相对。

返回例:20080909-1520/Administrator

 Request.ServerVariables["CERT_COOKIE"]:客户端验证的唯一 ID,以字符串方式返回。可作为整个客户端验证的签字
 Request.ServerVariables["CERT_FLAGS"]:如有客户端验证,则 bit0 为 1,如果客户端验证的验证人无效(不在服务器承认的 CA 列表中),bit1 被设置为 1
 Request.ServerVariables["CERT_ISSUER"]:用户验证中的颁布者字段(O=MS,OU=IAS,CN=user name,C=USA)
 Request.ServerVariables["CERT_KEYSIZE"]:安全套接字层连接关键字的位数
 Request.ServerVariables["CERT_SECRETKEYSIZE"]:服务器验证私人关键字的位数
 Request.ServerVariables["CERT_SERIALNUMBER"]:用户验证的序列号字段。
 Request.ServerVariables["CERT_SERVER_ISSUER"]:服务器验证的颁发者字段
 Request.ServerVariables["CERT_SERVER_SUBJECT"]:服务器验证的主字段。
 Request.ServerVariables["CERT_SUBJECT"]:客户端验证的主字段。
 Request.ServerVariables["CONTENT_LENGTH"]:客户端发出内容的长度。
 Request.ServerVariables["CONTENT_TYPE"]:内容的数据类型。同附加信息的查询一起使用,如 HTTP 查询 GET、 POST 和 PUT。
 Request.ServerVariables["GATEWAY_INTERFACE"]:服务器使用的 CGI 规格的修订。
 Request.ServerVariables["HTTPS"]:如果请求穿过安全通道(SSL),则返回 ON。如果请求来自非安全通道,则返回 OFF
 Request.ServerVariables["HTTPS_KEYSIZE"]:安全套接字层连接关键字的位数;
 Request.ServerVariables["HTTPS_SECRETKEYSIZE"]:服务器验证私人关键字的位数
 Request.ServerVariables["HTTPS_SERVER_ISSUER"]:服务器验证的颁发者字段
 Request.ServerVariables["HTTPS_SERVER_SUBJECT"]:服务器验证的主字段。
 Request.ServerVariables["INSTANCE_ID"]:文本格式 IIS 实例的 ID。如果实例 ID 为 1,则以字符形式出现。使用该变量可以检索请求所属的(元数据库中)Web 服务器实例的 ID。
 Request.ServerVariables["INSTANCE_META_PATH"]:响应请求的 IIS 实例的元数据库路径。
 Request.ServerVariables["LOCAL_ADDR"]:

返回接受请求的服务器地址。如果在绑定多个 IP 地址的多宿主机器上查找请求所使用的地址时,这条变量非常重要。

返回例:127.0.0.1

 Request.ServerVariables["PATH_INFO"]:

客户端提供的额外路径信息。可以使用这些虚拟路径和 PATH_INFO 服务器变量访问脚本。如果该信息来自 URL,在到达 CGI 脚本前就已经由服务器解码了。

返回例:Demo2/Default.aspx(就是文件所在路径)

 Request.ServerVariables["PATH_TRANSLATED"]:

PATH_INFO 转换后的版本,该变量获取路径并进行必要的由虚拟至物理的映射

返回例:d:/myfiles/net/Demo12/Default.aspx

 Request.ServerVariables["QUERY_STRING"]:查询 HTTP 请求中问号(?)后的信息。
 Request.ServerVariables["REMOTE_ADDR"]:

发出请求的远程主机的 IP 地址;

返回例:127.0.0.1

 Request.ServerVariables["REMOTE_HOST"]:

发出请求的主机名称。如果服务器无此信息,它将设置为空的 MOTE_ADDR 变量。

返回例:127.0.0.1

 Request.ServerVariables["REMOTE_PORT"]:发出请求的路由端口
 Request.ServerVariables["REQUEST_METHOD"]:

提出请求的方法,相当于用于 HTTP 的 GET、HEAD、POST

返回例:GET

 Request.ServerVariables["SCRIPT_NAME"]:

执行脚本的虚拟路径,

返回例:/net/Demo12/Default.aspx

 Request.ServerVariables["SERVER_NAME"]:出现在自引用 UAL 中的服务器主机名、DNS 化名或 IP 地址

返回例:localhost

 Request.ServerVariables["SERVER_PORT"]:发送请求的端口号。

返回例:4988

Request.ServerVariables["SERVER_PORT_SECURE"]:包含 0 或 1 的字符串。如果安全端口处理了请求,则为 1,否则为 0

返回例:0

 Request.ServerVariables["SERVER_PROTOCOL"]:请求信息协议的名称和修订。格式为 protocol/revision

返回例:HTTP/1.1

 Request.ServerVariables["SERVER_SOFTWARE"]:应答请求并运行网关的服务器软件的名称和版本。格式为 name/version
 Request.ServerVariables["URL"]:提供 URL 的基本部分(我看它获取域名外的地址,http-host+url构成一个网址)

返回例:/net/Demo12/Default.aspx

 Request.ServerVariables["HTTP_CACHE_CONTROL"]:max-age=0
Request.ServerVariables["HTTP_CONNECTION"]:keep-alive
 Request.ServerVariables["HTTP_ACCEPT"]:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Request.ServerVariables["HTTP_ACCEPT_CHARSET"]:GBK,utf-8;q=0.7,*;q=0.3
 Request.ServerVariables["HTTP_ACCEPT_ENCODING"]:gzip,deflate,sdch
 Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]:zh-CN,zh;q=0.8
 Request.ServerVariables["HTTP_HOST"]:获取域名

返回例:localhost:4988

Request.ServerVariables["HTTP_USER_AGENT"]:操作系统编号和浏览器版本号

返回例:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.519.0 Safari/534.7

转载于:https://www.cnblogs.com/wolfocme110/p/5015073.html

相关文章:

打开浏览器的包 node_如何发布可在浏览器和Node中使用的软件包

打开浏览器的包 nodeWhen you create a package for others to use, you have to consider where your user will use your package. Will they use it in a browser-based environment (or frontend JavaScript)? Will they use it in Node (or backend JavaScript)? Or bot…

存储过程中SELECT与SET对变量赋值

Create proc insert_bookparam1char(10),param2varchar(20),param3money,param4moneyoutputwith encryption---------加密asinsert into book(编号,书名,价格)Values(param1,param2,param3)select param4sum(价格) from bookgo执行例子:declare total_price moneyex…

AngularJs $resource 高大上的数据交互

$resource 创建一个resource对象的工厂函数,可以让你安全的和RESFUL服务端进行数据交互。 需要注入 ngResource 模块。angular-resource[.min].js 默认情况下,末尾斜杠(可以引起后端服务器不期望出现的行为)将从计算后的URL中剥离…

样式集(四)搜索框样式

上图&#xff1a; 代码&#xff1a; // pages/search/search.js var textPage({data: {input_val:"",list:[]},input_p(e){this.setData({input_val:e.detail.value})},onLoad: function (options) {}, }) <view classpage_row bindtap"suo"><vi…

初步了解React Native的新组件库firstBorn

first-born is a React Native UI Component Framework, which follows the design methodology Atomic Design by Brad Frost.first-born是React Native UI组件框架&#xff0c;它遵循Brad Frost的设计方法Atomic Design 。 Version 1.0.0 was recently published as an npm …

less里面calc() 语法

转载 Less的好处不用说大家都知道&#xff0c;确实让写CSS的人不在痛苦了&#xff0c;最近我在Less里加入calc时确发现了有点问题&#xff0c;我在Less中这么写&#xff1a;  div {  width : calc(100% - 30px);  }  结果Less把这个当成运算式去执行了&#xff0c;结果…

基于XMPP的IOS聊天客户端程序(XMPP服务器架构)

最近看了关于XMPP的框架&#xff0c;以文本聊天为例&#xff0c;需要发送的消息为&#xff1a; <message type"chat" from"kangserver.com" to"testserver.com"> <body>helloWord</body> </message> …

小程序云开发,判断数据库表的两个字段匹配 云开发数据库匹配之 and 和 or 的配合使用

云开发数据库匹配之 and 和 or 的配合使用 代码&#xff1a; // 获取成员消息onMsg2() {let that thiswx.cloud.init({env: gezi-ofhmx})const DB wx.cloud.database()const _ DB.command;var aa "1"var bb "2"DB.collection(message_logging).where…

react引入多个图片_重新引入React:v16之后的每个React更新都已揭开神秘面纱。

react引入多个图片In this article (and accompanying book), unlike any you may have come across before, I will deliver funny, unfeigned and dead serious comic strips about every React update since v16. It’ll be hilarious, either intentionally or unintention…

75. Find Peak Element 【medium】

75. Find Peak Element 【medium】 There is an integer array which has the following features: The numbers in adjacent positions are different.A[0] < A[1] && A[A.length - 2] > A[A.length - 1].We define a position P is a peek if: A[P] > A[P-1…

云开发地图标记导航 云开发一次性取所有数据

地图取 elx 表格的经纬度数据&#xff0c;存到云开发数据库里面&#xff0c;然后标记在地图上&#xff0c;点击地图的标记可以实现路线规划&#xff0c;导航&#xff0c;拨打电话。 elx数据格式如下&#xff1a; 云开发的数据库不能直接导入elx&#xff0c;所以需要转换为csv文…

未能加载文件或程序集“Report.Basic”或它的某一个依赖项。试图加载格式不正确的程序...

出现问题如下&#xff1a; 解决办法&#xff1a; 这是由于没有开启32位程序兼容模式 具体操作如下&#xff1a;找到对应的程序池--------高级设置-------修改“启用32位应用程序”状态修改为true 转载于:https://www.cnblogs.com/OliverQin/p/5018575.html

flutter开发小程序_为什么我认为Flutter是移动应用程序开发的未来

flutter开发小程序I dabbled a bit in Android and iOS development quite a few years back using Java and Objective-C. After spending about a month working with both of them, I decided to move on. I just couldn’t get into it.几年前&#xff0c;我使用Java和Obje…

小程序获取图片的宽高

代码&#xff1a; imgInfo(url){wx.getImageInfo({src: url,success (res) {console.log(res.width)console.log(res.height)return {width:res.width,height:res.height}}})},

凯撒密码、GDP格式化输出、99乘法表

1.恺撒密码的编码 plaincode input(明文&#xff1a;)print(密文&#xff1a;,end)for i in plaincode: print(chr(ord(i)3),end) 2.国家名称 GDP总量&#xff08;人民币亿元&#xff09; 中国 &#xffe5;765873.4375澳大利亚 &#xffe5; 78312.4375&#xff08;国家名称左…

random类的使用

小栗子a如下: string[] punch new[] { "石头", "剪刀", "布" }; string myPunch; public string MyPunch{get{Random random new Random();int Index random.Next(3);myPunch punch[Index].ToString();return myPunch;}} 转载于:https://ww…

如何使用C#在ASP.NET Core中轻松实现QRCoder

by Yogi由瑜伽士 如何使用C&#xff03;在ASP.NET Core中轻松实现QRCoder (How to easily implement QRCoder in ASP.NET Core using C#) QRCoder is a very popular QR Code implementation library written in C#. It is available in GitHub. Here I am going to implement…

简述软件配置管理

http://blog.csdn.net/zhangmike/article/details/470477本文用菊子曰发布转载于:https://www.cnblogs.com/sdsunjing/p/5019791.html

startActivityForResult和setResult详解

startActivityForResult和setResult详解 原文:startActivityForResult和setResult详解startActivityForResult与startActivity的不同之处在于&#xff1a;1、startActivity( ) 仅仅是跳转到目标页面&#xff0c;若是想跳回当前页面&#xff0c;则必须再使用一次startActivity( …

小程序瀑布流实现

实现思路&#xff1a;把图片分成两排&#xff0c;创建两个数组&#xff0c;计算总数组中图片的宽高&#xff0c;对比上一个图片和当前的图片高度&#xff0c;低的就给另一个数组添加。效果图&#xff1a; 上代码&#xff1a; // miniprogram/pages/find/index.js const app g…

Webhooks上的一个简单方法:恐吓现在停止

Webhook.Webhook。 It sounds like what happens when you cross a spider and a pirate. In the world of the internet though, webhooks are something completely different. Webhooks help connect services together.听起来就像当您越过蜘蛛和海盗时会发生什么。 但是&a…

12.MySql关于获取当前时间的三个函数

这三个函数都是获取当前时间的&#xff0c;获取的详细格式如下图所示&#xff0c;可以根据需要来选用。 转载于:https://www.cnblogs.com/Nick-Hu/p/7566805.html

微信小程序云开发,使用阿里云短信服务,搜索员工生日定期发送短信。

相关API文档地址&#xff1a; 阿里云短信服务API文档地址 小程序云开发云函数正则匹配API文档地址 小程序云开发云函数定时触发器 1.登录阿里云&#xff0c;购买短信服务并添加签名和模板 2.&#xff0c; 登录阿里云&#xff0c;鼠标放在右上角的头像图标就会显示 AccessKey…

信息安全系统设计基础家庭作业

《深入理解计算机系统》家庭作业 * 8.9 答案&#xff1a; 进程对 是否并发 AB 否 AC 是 AD 是 BC 是 BD 是 CD 是 * 8.10 答案&#xff1a; A. 调用一次&#xff0c;返回两次&#xff1a; fork B. 调用一次&#xff0c;从不返回&#xff1a; execve, longjmp C. 调…

css游戏代码_介绍CSSBattle-第一个CSS代码搜寻游戏

css游戏代码by kushagra gour由kushagra gour 介绍CSSBattle-第一个CSS代码搜寻游戏 (Introducing CSSBattle — the first CSS code-golfing game) If you are learning Web development or are already a professional Web developer, there is a very high chance you have…

IOS手机全屏长按识别二维码HTML代码

代码段作用讲解&#xff1a; 1. 二维码的全屏样式, opacity: 0; 透明样式&#xff0c; touch-callout: none; -webkit-touch-callout: none; -ms-touch-callout: none; -moz-touch-callout: none; 禁止IOS默认长按事件 .codePage {position: absolute;touch-callout: none;…

[亲测]在Mac下配置php开发环境:Apache+php+MySql

公司给我们配上了高大上的Apple Mac Pro本本&#xff0c;这两天自己正在习惯中。通过虚拟机PD&#xff0c;确实解决了一些因为工作习惯无法在iOS上很好完成的事情&#xff0c;但是我想&#xff0c;既然用起了iOS就尽量将一些事务在iOS环境下处理&#xff0c;免得好似关羽耍着大…

RabbitMQ 异常与任务分发

RabbitMQ 异常与任务分发 异常情况处理 上篇最后提到了这个问题&#xff0c; consumer异常退出、queue出错、甚至rabbitMQ崩溃。因为它们都是软件 &#xff0c;软件都会有bug&#xff0c;这是无法避免的。所以RabbitMQ在设计的时候也想到了这一点 在之前&#xff0c;消息分发给…

reddit_如何使用Python创建自定义Reddit通知系统

redditby Kelsey Wang王凯西 如何使用Python创建自定义Reddit通知系统 (How to make a custom Reddit notification system with Python) Don’t you just love automated emails? I know I do. I mean, who doesn’t enjoy waking up to 236 new messages from Nike, Ticket…

1016. Phone Bills (25)

时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue去掉非法数据计算账单A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the…