我有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
更多推荐
发布评论