zoukankan      html  css  js  c++  java
  • 用webclient实现无空间上传文件错误:Could not find a part of the path .....

    今天要在网站上面做一个批量上传的工具,但是不想用控件上传,感觉好麻烦,所以就在网上找了些资料,后来发现这种功能是可以实现下面我贴出代码:

    这个是在aspx.cs页面的代码:

    Code

    这个代码在本地是可以实现的,但是我编译后放在服务器上就不能用了,

    说明一下:我是根据上传空间选中的文件来判断文件夹的,然后上传这个文件夹中的所有图片,本地一点问题也没有,到服务器上就会报如下错误

    错误为:

    Server Error in '/' Application.

    Could not find a part of the path 'E:\1233566\AT005611.jpg'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\1233566\AT005611.jpg'.

    Source Error:


    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    这个错误蛮奇怪的,如果是服务器的权限,到没什么,但是确实我本地的文件夹,不需要的呀!

    有没人做过类似的东西,请教一下!

  • 相关阅读:
    SpringMvc与Struts2的对比
    Spring 通知
    Spring 之 AOP
    Spring 之 IOC
    Spring IOC 和 AOP概述
    JSON与JAVA数据的相互转换
    (4)-optXXX方法的使用
    (3)-JSONObject的过滤设置
    (2)-生成JSONObject的方法
    String 类型的相关转换
  • 原文地址:https://www.cnblogs.com/Longkin/p/1294043.html
Copyright © 2011-2022 走看看