以下为详细的报错信息:未处理的“System.NotSupportedException”类型的异常出现在 mscorlib.dll 中。其他信息: 不支持给定路径的格式。

解决方案 »

  1.   

    把mscorlib.dll 放到你的项目bin/debug文件夹下
      

  2.   

    樓上的胡扯,你的錯誤在於路徑格式有誤,比如
    FileInfo fi = new FileInfo(@"D:\aaa.txt");
    你要改為
    FileInfo fi = new FileInfo("D:\\aaa.txt");
      

  3.   

    forgot(忘记forgot2000正确。谢了。
      

  4.   

    string filename = System.IO.Path.GetFileName(afUpload.FileName);