该进程无法访问文件“C:\Inetpub\wwwroot\”因为它正在被另一个进程使用
我已将发布的 asp.net 文件从
C:/xyz/mywebsite 移至 c:/intepub/wwwroot/mywebsite。在网站的一项功能中,我们创建一个 txt 文件,然后在根文件夹中编辑该文本文件。
当我将其移动到新位置时,出现“无法创建文件,权限被拒绝...”的错误。然后我右键单击 intepub 文件夹并允许访问该组。现在我可以在其中创建一个文本文件,但无法写入它:我收到的错误是:
The process cannot access the file 'C:\Inetpub\wwwroot\' because it is being used by another process.
不幸的是,我无法对代码进行更改,因为它已经建立了网站并再次部署它将花费很多时间。
当它位于文件夹 C:/xyz/mywebsite 中时,整个功能工作正常。
现在,在不修改代码的情况下我可以在这里做什么?
I have moved my published asp.net files from
C:/xyz/mywebsite to c:/intepub/wwwroot/mywebsite. In one of the functionality of the website, we are creating a txt file and then editing that text file in the root folder.
When I moved it to new location, I got an error of "cannot create file, premission denied...". Then I right click the intepub folder and allow the access to the group. Now I am able to create a text file in that but unable to write it: The error I am getting is:
The process cannot access the file 'C:\Inetpub\wwwroot\' because it is being used by another process.
Unfortunately, I can't make changes in the code beacuse it already established website and to deploy it again will take so much time.
Whole functionality was working fine when It was in the folder C:/xyz/mywebsite.
Now what can I do here, without modifying the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,确保您的应用程序正确关闭文件创建后。
如果是这样,请尝试禁用索引服务。它可能会在新文件创建后立即为其建立索引。
First, make sure your application properly closes the file after creating it.
If it does, try disabling the indexing service. It might be indexing the new file right after its creation.