DirectoryNotFoundException: Could not find a part of the path "……"
来源:互联网 发布:淘宝运动服秋装男 编辑:程序博客网 时间:2024/05/01 05:17
DirectoryNotFoundException: Could not find a part of the path ,用google或者Baidu搜索,都能找到相关的问题。今天我也遇到了这个问题,许多人出现这个问题的时候,都是由于“文件或目录确实不存在”,“目录权限不正确”,“代码中虚拟路径与物理路径同时存在”。
我的情况归根结底类似于“文件或者目录不存在”,我的案例是一个ASP.NET文件上传类库,由于代码的疏忽,造成有时文件名丢失,只在saveAS方法里边留了个存放文件的目录,没有文件名。也就是说没错的时候应该是“路径+文件名”,而出错的时候只有一个“路径”。
至此,问题解决。似乎.NET不会胡来,它说出了什么问题,大概就出了什么。围绕Exception提示总能够找到解决办法。
- DirectoryNotFoundException: Could not find a part of the path "……"
- .net中创建目录的问题(未找到路径X的一部分|Could not find a part of the path)
- 【.Net码农】关于使用FileUpload控件报 Could not find a part of the path "X/1.jpg"
- 关于错误提示:could not find a part of path “X:\”的解决办法
- Eclispse出现:could not find the …
- AVD - PANIC: Could not open… - not a path issue
- Git of [error]could not find git path
- Could not find a price list in Ordered UOM xxx and Primary UOM of the item
- Invalidated object not currently part of this pool/Could not return the resource to the pool
- could not find the adb
- Matlab提示Could not find the compiler cl on the DOS path
- could not find git path的解决方法
- "[ERROR] Could not find git path"
- Could not find the required version of the Java(TM)2 Runtime Environment in '(null)' 解决办法
- Could not find the required version of the Java(TM)2 Runtime Environment in '(null)' 解决办法
- Hive Could not find status of job
- Could not publish server configuration for JKGL2. Multiple Contexts have a path of "/JKGL2".
- Java中Could not find the main cl…
- 配置HSQLDB数据库[服务器模式]
- Linux 下的屏幕取词技术
- JMS要点
- 好几天没上来了
- 又有了一个blog
- DirectoryNotFoundException: Could not find a part of the path "……"
- 感觉
- 李开复到我校演讲:选择的智慧
- 以最强烈的愤恨控诉流氓软件的罪行 (转)
- 庆贺
- SQL Server 2005对XML的支持
- 2005.11.3 Bank5小组第四次会议
- 中国人的幸福生活
- Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting Services Service Pack 2