关于错误提示:could not find a part of path “X:\”的解决办法
2012-03-01 09:42
926 查看
Win2k在NTFS系统下可能会出现这样的错误提示,解决办法很简单,只要在网站所在系统盘根目录给ASPNET用户读取权限就可以了,因为原因就是 Server.MapPath() 这个方法,这个方法是让一个相对路径转为绝对路径,而在转换的过程序中,.NET框架需要得到当前硬盘的一些属性,如盘符等,而这个时候,如果将.Net用户对磁盘根目录的权限全部拒绝,从而导致程序无法正常运行。Server.MapPath() 这个方法却是创建目录或文件所必须的,如下面创建目录的代码:
Directory.CreateDirectory(Server.MapPath("Test"));
如果不给ASPNET根目录的读取权限,就会出错。
Directory.CreateDirectory(Server.MapPath("Test"));
如果不给ASPNET根目录的读取权限,就会出错。
相关文章推荐
- 记录一下,关于错误提示:could not find a part of path “X:\”的解决办法
- 记录一下,关于错误提示:could not find a part of path “X:\”的解决办法
- 用Reflector的插件Reflexil 报错: could not find a part of the path 'c:\documents and settings\ ……的解决办法
- 解决文件无法上传的问题,错误信息:System.IO.DirectoryNotFoundException: Could not find a part of the path.
- 关于使用FileUpload控件报 Could not find a part of the path "X\1.jpg"
- 关于android编程中遇到的Could not find class 'com.swetake.util.Qrcode错误的原因及解决办法
- 【.Net码农】关于使用FileUpload控件报 Could not find a part of the path "X/1.jpg"
- 用webclient实现无空间上传文件错误:Could not find a part of the path .....
- 关于android编程中遇到的Could not find class 'com.swetake.util.Qrcode错误的原因及解决办法
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
- 关于nios ii 中 bash.exe: warning:could not find /tmp. please create! 的错误解决
- org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console错误解决办法
- U盘安装ubuntu 10.10,出现错误:Could not find kernel image 的解决办法
- ORA-12520 TNS:Listener count not find available handler for requested type of server错误解决办法
- Could not find property 'ile' on org.gradle.api.internal.artifacts.dsl.dependencies.错误解决办法
- 关于OpenSUSE安装HLA编译时,提示:Could not open include file "stdlib.hhf" 的解决办法之一
- Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'F:\'.
- 关于“Could not find a valid gem 'bundler' (>= 0) in any repository” 解决办法。
- linux安装mysql出现Could NOT find Curses (missing CURSES_LIBRARY CURSES_INCLUDE_PATH),提示解决方法
- Could not find the required version of the Java(TM)2 Runtime Environment in '(null)' 解决办法