问题描述
大家好,
我将项目上传到我们的生产服务器.在开发过程中,它运行良好.
所以问题是;当用户登录时,我有一个功能,该功能将写入文件.但是我遇到了这个错误;
找不到路径``c:\ windows \ system32 \ inetsrv \ XMLs \ Requests \ Log(09.14.2011 3.15 PM).xml''的一部分.
在我的web.config中,我添加了以下内容:
Hello guys,
I uploaded my project to our production server. While I am developing it was working fine.
So the problem is; when a user logs in I have a function and this function writes to a file. But I am having this error;
Could not find a part of the path ''c:\windows\system32\inetsrv\XMLs\Requests\Log(09.14.2011 3.15 PM).xml''.
In my web.config I have added this:
<identity impersonate="true" />
>
我正在使用StreamWriter将其写入文件和我使用的路径
"./XMLs/Requests/Log/[在这里我写文件名]"我也曾尝试替换.".带有〜",例如〜/XMLs/Requests/Log/[在这里我写文件名]"
我已检查服务器中是否存在"/XMLs/Requests/Log/"路径.
我想念一些东西.关于这个问题有人可以帮我吗?谢谢
I am using the StreamWriter to write it to a file and the path I used
"./XMLs/Requests/Log/[Here I write the file name]" I have also tried replacing "." with "~" like "~/XMLs/Requests/Log/[here I write the file name]"
I have checked the "/XMLs/Requests/Log/" path is existing in the server.
I am missing something. Can somebody help me regarding to the issue? Thanks
推荐答案
这篇关于Server.MapPath()方法(找不到路径错误的一部分)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!