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.

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

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

  • 相关阅读:
    软考自查:面向对象设计
    软考自查:UML建模
    软考自查:数据库设计
    软考自查:数据流图(DFD)
    软考自查:多媒体基础知识
    .user.ini后门/上传黑名单绕过
    域渗透:钓鱼欺骗配合SMB重放攻击
    实现:ipc管道连接到远程计划任务种马
    实现:ipc命名管道连接
    实现:注册表的增删改查
  • 原文地址:https://www.cnblogs.com/Longkin/p/1294043.html
Copyright © 2011-2022 走看看