Ext: http://www.cnblogs.com/pumaboyd/archive/2006/09/13/502820.html
ASP. The path problem in net
This is my page request link http://localhost/MyWeb/Store/Page1.aspx?ddddd=9. The following is the path shown by the corresponding method, and a comparison should be made to find the way you want to get the path. |
Request.rawurl |
The original URL is defined as the section after the domain information in the URL. In the URL string http://www.contoso.com/articles/recent.aspx, the original URL is/articles/recent.aspx. The original URL includes a query string (if present). |
/myweb/store/page1.aspx?ddddd=9 |
Request.path |
The virtual path of the current request. |
/myweb/store/page1.aspx |
Request.pathinfo |
For the URL Http://www.contoso.com/virdir/page.html/tail,PathInfo value is/tail. |
|
Request.currentexecutionfilepath and Request.filepath |
Currentexecutionfilepath returns the correct file path for the currently executed page in a redirection scheme such as Execute and Transfer. When the client redirects to another page,FilePath Returns the path to the initial page; Currentexecutionfilepath returns the path to the child page. |
/myweb/store/page1.aspx |
Request. Physicalapplicationpath |
Gets the physical file system path of the root directory of the currently executing server application. (Directory of applications) |
k:/myweb/myweb/ |
Request. PhysicalPath |
Gets the physical file system path that corresponds to the requested URL. |
K:/myweb/myweb/store/page1.aspx |
Request.applicationpath |
Gets the virtual application root path of the ASP.net application on the server. |
/myweb |
AppDomain.CurrentDomain.BaseDirectory |
Gets the base directory that is used by the Assembly resolver to probe the assembly. |
k:/myweb/myweb/ |
AppDomain.CurrentDomain.RelativeSearchPath |
Gets the path relative to the base directory where the Assembly resolver should probe the private assembly. |
Bin |
Assembly.codebase |
Gets the location of the originally specified assembly |
File:///k:/MyWeb/MyWeb/bin/MyWeb.DLL |
Assembly.location |
Gets the location of the file's base code format if the loaded file containing the manifest is not shadow copied. |
C:/windows/microsoft.net/framework/v1.1.4322/temporary asp.net files/myweb/a6aa4523/7564b5f7/assembly/dl2/ 19cb75f7/002a8314_c272c601/myweb.dll |
Request.Server.MapPath () |
Maps the specified virtual path to a physical path. |
|