托管我的网站后,在我的帐户中创建目录的路径错误 [英] path error for directory creation in my account after hosting my site

查看:101
本文介绍了托管我的网站后,在我的帐户中创建目录的路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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





路径,我使用以下行



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.


这篇关于托管我的网站后,在我的帐户中创建目录的路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆