无法使用asp.net在live网站的运行时创建目录(Not able to create directory at runtime in live website using asp.net)

编程入门 行业动态 更新时间:2024-10-21 10:12:56
无法使用asp.net在live网站的运行时创建目录(Not able to create directory at runtime in live website using asp.net)

我有godaddy服务器帐户,我想在运行时在我的网站位置创建一个目录,我使用下面给出的代码来创建目录。

System.IO.Directory.CreateDirectory(directoryPath);

但是显示500 internal server错误。

I have godaddy server account, I want to create a directory on my website location at runtime and I am using the code given below to create directory.

System.IO.Directory.CreateDirectory(directoryPath);

But 500 internal server error is displaying.

最满意答案

特定的ASP用户需要父文件夹的权限才能创建新文件夹。 用户可以是IIS_USERS,IUSR,ASP_NET或类似的......

编辑:额外的细节,在服务器上 - 您尝试创建文件夹(父文件夹) - 右键单击​​并打开安全窗口。 在此窗口中,您要为IIS用户添加“修改”(或“完全控制”)。 (使用ADD按钮首先添加IIS_USERS,然后确保为完全控制选中了ALLOW)它可能被称为IIS_USERS,但您可以根据您的系统进行检查。 默认情况下,用户不会拥有权限。

请参阅此GoDaddy以编程方式为网站上的新用户创建目录

The specific ASP User will need permission on the parent folder to create new folders. The User could be IIS_USERS, IUSR, ASP_NET or similar...

EDIT: Extra detail, On the server - where you are trying to create a folder (the Parent folder) - Right Click and bring up the Security window. In this window you want to Add 'Modify' (or 'Full Control') for the IIS User. (Use the ADD button to add the IIS_USERS first, then ensure that ALLOW is ticked for Full Control) It is probably called IIS_USERS but you can check this depending on your system. The User will NOT have permission by default.

See this re GoDaddy Programatically create directory for new user on web site

更多推荐

本文发布于:2023-08-07 06:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1462322.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目录   网站   net   live   asp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!