查看: 817|回复: 2
|
asp.net create folder 在 server side 的问题。。。
[复制链接]
|
|
我想从client side create folder dynamic 在server side....
这是我的code:
Dim create As New System.IO.DirectoryInfo(Server.MapPath("abc" & "/" & abc.Text)
create.Create()
原本在自己的server没问题的。。搬去 hosting side结果问题一大堆
error 如下:
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
大家请帮帮忙。。。。 |
|
|
|
|
|
|
|
发表于 12-2-2007 08:49 AM
|
显示全部楼层
是securitty 跟 permission setting 的问题。
make sure 你所要dynamic create folder 得root folder 有write/create folder 的permission 即可。还要check 你的app user/web user 有permission 。 |
|
|
|
|
|
|
|

楼主 |
发表于 12-2-2007 11:56 PM
|
显示全部楼层
怎样检查 app user 有 permission??
到目前我所知道的是因为在local host 拥有 full trust 而在 hosting side 是middle trust所以 System.IO 有问题。。 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|