Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在.NET中将URI路径转换为绝对文件系统路径_C#_Asp.net - Fatal编程技术网

C# 在.NET中将URI路径转换为绝对文件系统路径

C# 在.NET中将URI路径转换为绝对文件系统路径,c#,asp.net,C#,Asp.net,在C#ASP.Net中,如何转换: 发件人: 到:C:\WebServerRoot\foo\bar.html考虑到“example.com”是运行ASP.NET应用程序的web服务器,以下代码返回文件的本地(物理)路径: var server = HttpContext.Current.Server; string filePath = server.MapPath("/foo/bar.html"); 啊,现在看来这是可信的。URL数据在taht函数@Rodolfo的输入中

在C#ASP.Net中,如何转换:

发件人: 到:C:\WebServerRoot\foo\bar.html

考虑到“example.com”是运行ASP.NET应用程序的web服务器,以下代码返回文件的本地(物理)路径:

var server =  HttpContext.Current.Server;
string filePath = server.MapPath("/foo/bar.html");
啊,现在看来这是可信的。URL数据在taht函数@Rodolfo的输入中