佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 817|回复: 2

asp.net create folder 在 server side 的问题。。。

[复制链接]
发表于 12-2-2007 05:55 AM | 显示全部楼层 |阅读模式
我想从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.

大家请帮帮忙。。。。
回复

使用道具 举报


ADVERTISEMENT

发表于 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 有问题。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 28-8-2025 07:50 AM , Processed in 0.095962 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表