如题:
Response.Write(System.Environment.SystemDirectory.ToString());不是这样的吧
我要获取你的系统所安装的盘路径!在线等

解决方案 »

  1.   

    还是运用
     Response.Write(Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.System)));
      

  2.   

    是不是获得虚拟目录的绝对路径?
    Response.Write(Request.ServerVariables["APPL_RHYSICAL_PATH"]);
      

  3.   

    AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
      

  4.   

    System.Environment.CurrentDirectory  
    获取和设置当前目录(该进程从中启动的目录)的完全限定目录。  
    System.IO.Directory.GetCurrentDirectory()  
    获取应用程序的当前工作目录。
    System.AppDomain.CurrentDomain.BaseDirectory  
    获取程序的基目录。  
    System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase  
    获取和设置包括该应用程序的目录的名称。  
      

  5.   


    using System;class Sample 
    {
        public static void Main() 
        {
        Console.WriteLine();
    //  <-- Keep this information secure! -->
        Console.WriteLine("SystemDirectory: {0}", Environment.SystemDirectory);
        }
    }
    /*
    This example produces the following results:SystemDirectory: C:\WINNT\System32
    */