Asp.net中Request.Url的各个属性对应的意义介绍
程序员文章站
2024-03-05 20:11:25
1.简单的环境搭建 在本地iis上配置了一个网站:主机名为wjnhome.com,端口88,然后建了一个虚拟目录指向同一站点,虚拟目录名称为virtual,配置host...
1.简单的环境搭建
在本地iis上配置了一个网站:主机名为wjnhome.com,端口88,然后建了一个虚拟目录指向同一站点,虚拟目录名称为virtual,配置host为127.0.0.1 wjnhome.com
所以地址就为:http://jb51.net:88/virtual/urldemo.aspx?id=2#top
2.编写简单的代码
3.输出结果
request.applicationpath:/virtual
request.physicalpath:e:\vsproject\201200420\urldemo\urldemo\urldemo.aspx
directoryname:e:\vsproject\201200420\urldemo\urldemo
request.physicalapplicationpath:e:\vsproject\201200420\urldemo\urldemo\
filename:urldemo.aspx
request.currentexecutionfilepath:/virtual/urldemo.aspx
request.filepath:/virtual/urldemo.aspx
request.path:/virtual/urldemo.aspx
request.rawurl:/virtual/urldemo.aspx?id=2
request.url.absolutepath:/virtual/urldemo.aspx
request.url.absoluteuri:http://jb51.net:88/virtual/urldemo.aspx?id=2
request.url.scheme:http
request.url.host:wjnhome.com
request.url.port:88
request.url.authority:wjnhome.com:88
request.url.localpath:/virtual/urldemo.aspx
request.pathinfo:
request.url.pathandquery:/virtual/urldemo.aspx?id=2
request.url.query:?id=2
request.url.fragment:
request.url.dnssafehost:wjnhome.com
request.url.originalstring:http://jb51.net:88/virtual/urldemo.aspx?id=2
request.url.userinfo:
request.urlreferrer:
request.url.segment0:/
request.url.segment1:virtual/
request.url.segment2:urldemo.aspx
作者:wjn
在本地iis上配置了一个网站:主机名为wjnhome.com,端口88,然后建了一个虚拟目录指向同一站点,虚拟目录名称为virtual,配置host为127.0.0.1 wjnhome.com
所以地址就为:http://jb51.net:88/virtual/urldemo.aspx?id=2#top
2.编写简单的代码
3.输出结果
request.applicationpath:/virtual
request.physicalpath:e:\vsproject\201200420\urldemo\urldemo\urldemo.aspx
directoryname:e:\vsproject\201200420\urldemo\urldemo
request.physicalapplicationpath:e:\vsproject\201200420\urldemo\urldemo\
filename:urldemo.aspx
request.currentexecutionfilepath:/virtual/urldemo.aspx
request.filepath:/virtual/urldemo.aspx
request.path:/virtual/urldemo.aspx
request.rawurl:/virtual/urldemo.aspx?id=2
request.url.absolutepath:/virtual/urldemo.aspx
request.url.absoluteuri:http://jb51.net:88/virtual/urldemo.aspx?id=2
request.url.scheme:http
request.url.host:wjnhome.com
request.url.port:88
request.url.authority:wjnhome.com:88
request.url.localpath:/virtual/urldemo.aspx
request.pathinfo:
request.url.pathandquery:/virtual/urldemo.aspx?id=2
request.url.query:?id=2
request.url.fragment:
request.url.dnssafehost:wjnhome.com
request.url.originalstring:http://jb51.net:88/virtual/urldemo.aspx?id=2
request.url.userinfo:
request.urlreferrer:
request.url.segment0:/
request.url.segment1:virtual/
request.url.segment2:urldemo.aspx
作者:wjn