托管我的网站后,在我的帐户中创建目录的路径错误

问题描述:

我正在开发网站文档管理相关它在本地服务器上工作当我创建目录并将文件上传到用户帐户但是在服务器上托管网站后我无法创建文件夹并在用户帐户上传文件(我的帐户)一些路径错误即将到来





路径,我使用以下行



rootFolder = this.Server.MapPath(ConfigurationManager.AppSettings [rootfolder]);

I am develop web site document management related it work at local server when i creating directory and uploading file to user account but after hosting the site on server i cant create folder and upload file at user account(my account) some path error are coming


for the path , i used following line

rootFolder = this.Server.MapPath(ConfigurationManager.AppSettings["rootfolder"]);

这是一个访问isstu。



在web.config中添加此项并根据需要进行自定义。

It's an access isstu.

Add this in your web.config and customize as required.
<system.web>

        <authentication mode="Windows">
            <identity impersonate="true">
                userName="AdministratorId" 
                password="Administratorpassword"/>
         </identity></authentication>

</system.web>


我不建议冒充用户。我宁愿建议为运行应用程序池的用户帐户提供文件夹的必要权限。
I would not suggest impersonating as a user. I would rather suggest giving the user account that is running the application pool the necessary permissions to the folders.


从设置中更改用户应用程序目录的权限设置。
change permission setting of the application directory for the users from settings.