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.

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

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

  • 相关阅读:
    String.PadLeft()
    数据生成树 新增
    SQL允许你用EXECUTE执行一个变量中定义的SQL语句,并且允许你在被执行的SQL语句中,再次嵌套入一个变量定义的语句,并且再次在其中用EXECUTE执行它
    获取SqlConnection的统计信息
    页面缓存 OutputCache
    将小写金额转换成大写
    判断是否枚举中的匹配项
    js获取系统时间的几种方法<一> 《网摘学习》
    将指定文件夹(路径)下的所有内容copy到目标文件夹(路径)下的方法
    50个优美的句子<摘自网上>
  • 原文地址:https://www.cnblogs.com/Longkin/p/1294043.html
Copyright © 2011-2022 走看看