在本机上用的是Server.MapPath("../db/AUSTU.mdb") 到服务器上说路径错了!怎么办?

解决方案 »

  1.   

    Server.MapPath(@"../db/AUSTU.mdb") 看看可以不?
      

  2.   

    你这样:
    string filepath = Server.MapPath("../db/AUSTU.mdb") ;
    this.response.write(filepath);
    this.response.end();
    把你的路径打印出来,看是不是正确的.
      

  3.   

    你这样:
    string filepath = Server.MapPath("../db/AUSTU.mdb") ;
    this.response.write(filepath);
    this.response.end();
    把你的路径打印出来,看是不是正确的.
    ————————————————————————————————————————————   竟然没有反应了,什么也没有显示!在本地机器上有显示地址!
        传到服务器需要什么配置吗?
      

  4.   

    天啊!那个空间不会是假的asp.net吧!
    各位快来看看啊!到底怎么回事的呀!
      

  5.   

    change the ".." to " ~ "
    try it again
      

  6.   

    而且我的
       虚拟目录绝对路径:E:\web_Server\User_web\wlmemail\ 
       是用asp.net双向探针 测试得到的
    我用那个Server.MapPath("../db/AUSTU.mdb") 得到的路径是  E:\web_Server\User_web\test_ht91\db\AUSTU.mdb为什么啊???
      

  7.   

    有谁知道Request.ServerVariables["APPL_PHYSICAL_PATH"] 和Server.MapPath 以及Request.ServerVariables["PATH_TRANSLATED"] 的区别?
      

  8.   

    你也可用
    this.Request.PhysicalApplicationPath
    来求取你虚拟目录的路径
      

  9.   

    谢谢 hchxxzx(NET?摸到一点门槛) 大哥,那个服务器上不能用Server.MapPath 用了不知道怎么就错的!只有用绝对路径了! 测试过,可以的!但是就是不知道为什么啊?还有你说的this.Request.PhysicalApplicationPath 要什么样的参数啊?