找回密码
 注册
首页 ≡≡网络技术≡≡ 编程语言 ASP内置对象详解之Request对象

ASP内置对象详解之Request对象

灰儿 2006-11-25 21:17:23
<P align=center>ASP内置对象详解之Request对象</P><P>  Request对象用于接受所有从浏览器发往你的服务器的请求内的所有信息。</P><B><P>  集合</P><P>  Request.ClientCertificate(key[SubField])</P></B><P>  所有客户证书的信息的集合。对于<I>Key</I>,该集合具有如下的关键字:</P><CENTER><TABLE cellSpacing=0 cellPadding=7 width=473 border=1>&lt;TBODY><TR><TD vAlign=top width="24%"><FONT lang=ZH-CN face=System,黑体><P>Subject</P></FONT></TD><TD vAlign=top width="76%"><P>证书的主题。包含所有关于证书收据的信息。能和所有的子域后缀一起使用。</P></TD></TR><TR><TD vAlign=top width="24%"><P>Issuer</P></TD><TD vAlign=top width="76%"><P>证书的发行人。包含所有关于证书验证的信息。除了CN外,能和所有的子域后缀一起使用。</P></TD></TR><TR><TD vAlign=top width="24%"><P>VadidFrom</P></TD><TD vAlign=top width="76%"><P>证书发行的日期。使用VBScript格式。</P></TD></TR><TR><TD vAlign=top width="24%"><P>ValidUntil</P></TD><TD vAlign=top width="76%"><P>该证书不在有效的时间。</P></TD></TR><TR><TD vAlign=top width="24%"><P>SerialNumber</P></TD><TD vAlign=top width="76%"><P>包含该证书的序列号。</P></TD></TR><TR><TD vAlign=top width="24%"><P>Certificate</P></TD><TD vAlign=top width="76%"><P>包含整个证书内容的二进制流,使用ASN.1格式。</P></TD></TR>&lt;/TBODY></TABLE></CENTER><P>  对于<I>SubField</I>,Subject和Issuer关键字可以具有如下的子域后缀:(比如:SubjectOU或IssuerL)</P><CENTER><TABLE cellSpacing=0 cellPadding=7 width=444 border=1>&lt;TBODY><TR><TD vAlign=top width="32%"><FONT lang=ZH-CN face=System,黑体><P>C</P></FONT></TD><TD vAlign=top width="68%"><P>起源国家。</P></TD></TR><TR><TD vAlign=top width="32%"><P>O</P></TD><TD vAlign=top width="68%"><P>公司或组织名称。</P></TD></TR><TR><TD vAlign=top width="32%"><P>OU</P></TD><TD vAlign=top width="68%"><P>组织单元。</P></TD></TR><TR><TD vAlign=top width="32%"><P>CN</P></TD><TD vAlign=top width="68%"><P>用户的常规名称。</P></TD></TR><TR><TD vAlign=top width="32%"><P>L</P></TD><TD vAlign=top width="68%"><P>局部。</P></TD></TR><TR><TD vAlign=top width="32%"><P>S</P></TD><TD vAlign=top width="68%"><P>州(或省)。</P></TD></TR><TR><TD vAlign=top width="32%"><P>T</P></TD><TD vAlign=top width="68%"><P>个人或公司的标题。</P></TD></TR><TR><TD vAlign=top width="32%"><P>GN</P></TD><TD vAlign=top width="68%"><P>给定名称。</P></TD></TR><TR><TD vAlign=top width="32%"><P>I</P></TD><TD vAlign=top width="68%"><P>初始。</P></TD></TR>&lt;/TBODY></TABLE></CENTER><P>  当文件cervbs.inc(VBScript使用)或cerjavas.inc(Jscript使用)通过使用#INCLUDE导向包含在你的Active Server Page里时,下面两个标志可以使用:</P><CENTER><TABLE cellSpacing=0 cellPadding=7 width=444 border=1>&lt;TBODY><TR><TD vAlign=top width="39%"><FONT lang=ZH-CN face=System,黑体><P>ceCertPresent</P></FONT></TD><TD vAlign=top width="61%"><P>指明客户证书是否存在,其值为TRUE或FALSE。</P></TD></TR><TR><TD vAlign=top width="39%"><P>ceUnrecongnizedIssure</P></TD><TD vAlign=top width="61%"><P>指明在该链表中的最后的证书的发行者是否未知,其值为TRUE或FALSE。</P></TD></TR>&lt;/TBODY></TABLE></CENTER>&lt;/DIV&gt;<B><P>  Request.Cookies(Cookie[(key).Attribute])</P></B><P>  Cookie的集合。允许获得浏览器的Cookie。<I>Cookie</I>指明返回那一个Cookie。<I>Key</I>用于从Cookie字典中返回具有某一关键字的Cookie值。对于<I>Attribute</I>,你能使用属性HasKeys来确定某一Cookie是否具有子关键字。HasKeys的值为TRUE或FALSE。</P><B><P>  Request.Form(Parameter)[(Index).Count]</P></B><P>  填写在HTML的表单中所有的数据的集合。Parameter是在HTML表单中某一元素的名称。当某一参数具有不止一个值(比如,当在&lt;SELECT&gt;中使用MULTIPLE属性时)时,使用<I>Index</I>。当某一参数具有多值时,<I>Count</I>指明多值个数。</P><B><P>  Request.QueryString(Varible)[(Index).Count]</P></B><P>  查询字符串的所有值的集合。<I>Varible</I>是在查询字符串某一变量的名称。当某一变量具有多于一个值时,使用<I>Index</I>。当某一参数具有多值时,<I>Count</I>指明值的个数。</P><B><P>  Request.ServerVaribles(Server Environment Variable)</P></B><P>  环境变量的集合。允许读取HTTP头。你可以通过使用HTTP_前缀来读取任何头信息。比如,HTTP_USER_AGENT接受客户代理HTTP头(浏览器类型)。除此外,你可以使用下表所示的变量获得任何环境信息。</P><TABLE cellSpacing=0 cellPadding=7 width=516 align=center border=1>&lt;TBODY><TR><TD vAlign=top width="42%"><FONT lang=ZH-CN face=System,黑体><P>ALL_HTTP</P></FONT></TD><TD vAlign=top width="58%"><P>客户端发送的所有HTTP标头,他的结果都有前缀HTTP_。</P></TD></TR><TR><TD vAlign=top width="42%"><P>ALL_RAW</P></TD><TD vAlign=top width="58%"><P>客户端发送的所有HTTP标头,其结果和客户端发送时一样,没有前缀HTTP_ </P></TD></TR><TR><TD vAlign=top width="42%"><P>APPL_MD_PATH</P></TD><TD vAlign=top width="58%"><P>应用程序的元数据库路径。</P></TD></TR><TR><TD vAlign=top width="42%"><P>APPL_PHYSICAL_PATH</P></TD><TD vAlign=top width="58%"><P>与应用程序元数据库路径相应的物理路径。</P></TD></TR><TR><TD vAlign=top width="42%"><P>AUTH_PASSWORD</P></TD><TD vAlign=top width="58%"><P>当使用基本验证模式时,客户在密码对话框中输入的密码。</P></TD></TR><TR><TD vAlign=top width="42%"><P>AUTH_TYPE</P></TD><TD vAlign=top width="58%"><P>这是用户访问受保护的脚本时,服务器用于检验用户的验证方法。</P></TD></TR><TR><TD vAlign=top width="42%"><P>AUTH_USER</P></TD><TD vAlign=top width="58%"><P>代验证的用户名。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_COOKIE</P></TD><TD vAlign=top width="58%"><P>唯一的客户证书ID号。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_FLAG</P></TD><TD vAlign=top width="58%"><P>客户证书标志,如有客户端证书,则bit0为0。如果客户端证书验证无效,bit1被设置为1。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_ISSUER</P></TD><TD vAlign=top width="58%"><P>用户证书中的发行者字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_KEYSIZE</P></TD><TD vAlign=top width="58%"><P>安全套接字层连接关键字的位数,如128。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_SECRETKEYSIZE</P></TD><TD vAlign=top width="58%"><P>服务器验证私人关键字的位数。如1024。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_SERIALNUMBER</P></TD><TD vAlign=top width="58%"><P>客户证书的序列号字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_SERVER_ISSUER</P></TD><TD vAlign=top width="58%"><P>服务器证书的发行者字段</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_SERVER_SUBJECT</P></TD><TD vAlign=top width="58%"><P>服务器证书的主题字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CERT_SUBJECT</P></TD><TD vAlign=top width="58%"><P>客户端证书的主题字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CONTENT_LENGTH</P></TD><TD vAlign=top width="58%"><P>客户端发出内容的长度。</P></TD></TR><TR><TD vAlign=top width="42%"><P>CONTENT_TYPE</P></TD><TD vAlign=top width="58%"><P>客户发送的form内容或HTTP PUT的数据类型。</P></TD></TR><TR><TD vAlign=top width="42%"><P>GATEWAY_INTERFACE</P></TD><TD vAlign=top width="58%"><P>服务器使用的网关界面。</P></TD></TR><TR><TD vAlign=top width="42%"><P>HTTPS</P></TD><TD vAlign=top width="58%"><P>如果请求穿过安全通道(SSL),则返回ON。如果请求来自非安全通道,则返回OFF。</P></TD></TR><TR><TD vAlign=top width="42%"><P>HTTPS_KEYSIZE</P></TD><TD vAlign=top width="58%"><P>安全套接字层连接关键字的位数,如128。</P></TD></TR><TR><TD vAlign=top width="42%"><P>HTTPS_SECRETKEYSIZE</P></TD><TD vAlign=top width="58%"><P>服务器验证私人关键字的位数。如1024。</P></TD></TR><TR><TD vAlign=top width="42%"><P>HTTPS_SERVER_ISSUER</P></TD><TD vAlign=top width="58%"><P>服务器证书的发行者字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>HTTPS_SERVER_SUBJECT</P></TD><TD vAlign=top width="58%"><P>服务器证书的主题字段。</P></TD></TR><TR><TD vAlign=top width="42%"><P>INSTANCE_ID</P></TD><TD vAlign=top width="58%"><P>IIS实例的ID号。</P></TD></TR><TR><TD vAlign=top width="42%"><P>INSTANCE_META_PATH</P></TD><TD vAlign=top width="58%"><P>响应请求的IIS实例的元数据库路径。</P></TD></TR><TR><TD vAlign=top width="42%"><P>LOCAL_ADDR</P></TD><TD vAlign=top width="58%"><P>返回接受请求的服务器地址。</P></TD></TR><TR><TD vAlign=top width="42%"><P>LOGON_USER</P></TD><TD vAlign=top width="58%"><P>用户登录Windows NT的帐号</P></TD></TR><TR><TD vAlign=top width="42%"><P>PATH_INFO</P></TD><TD vAlign=top width="58%"><P>客户端提供的路径信息。</P></TD></TR><TR><TD vAlign=top width="42%"><P>PATH_TRANSLATED</P></TD><TD vAlign=top width="58%"><P>通过由虚拟至物理的映射后得到的路径。</P></TD></TR><TR><TD vAlign=top width="42%"><P>QUERY_STRING</P></TD><TD vAlign=top width="58%"><P>查询字符串内容。</P></TD></TR><TR><TD vAlign=top width="42%"><P>REMOTE_ADDR</P></TD><TD vAlign=top width="58%"><P>发出请求的远程主机的IP地址。</P></TD></TR><TR><TD vAlign=top width="42%"><P>REMOTE_HOST</P></TD><TD vAlign=top width="58%"><P>发出请求的远程主机名称。</P></TD></TR><TR><TD vAlign=top width="42%"><P>REQUEST_METHOD</P></TD><TD vAlign=top width="58%"><P>提出请求的方法。比如GET、HEAD、POST等等。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SCRIPT_NAME</P></TD><TD vAlign=top width="58%"><P>执行脚本的名称。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SERVER_NAME</P></TD><TD vAlign=top width="58%"><P>服务器的主机名、DNS地址或IP地址。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SERVER_PORT</P></TD><TD vAlign=top width="58%"><P>接受请求的服务器端口号。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SERVER_PORT_SECURE</P></TD><TD vAlign=top width="58%"><P>如果接受请求的服务器端口为安全端口时,则为1,否则为0。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SERVER_PROTOCOL</P></TD><TD vAlign=top width="58%"><P>服务器使用的协议的名称和版本。</P></TD></TR><TR><TD vAlign=top width="42%"><P>SERVER_SOFTWARE</P></TD><TD vAlign=top width="58%"><P>应答请求并运行网关的服务器软件的名称和版本。</P></TD></TR><TR><TD vAlign=top width="42%"><P>URL</P></TD><TD vAlign=top width="58%"><P>提供URL的基本部分。</P></TD></TR>&lt;/TBODY></TABLE><P><B>  方法</P><P>  Request.BinaryRead(Count)</P></B><P>  接收一个HTML表单的未经过处理的内容。当调用此方法时,<I>Count</I>指明要接收多少字节。在调用此方法后,<I>Count</I>指明实际上接收到多少个字节。</P><B><P>  属性</P><P>  Request.TotalBytes</P></B><P>  查询体的长度,以字节为单位。</P><p>[此帖子已被 灰儿 在 2006-11-25 21:21:32 编辑过]
您需要登录后才可以回帖 登录 | 注册
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言 了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言 了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。