gpt4 book ai didi

vb.net - 当我将文本文件复制到服务器上的另一个文件夹时,对路径 ' ' 的访问被拒绝

转载 作者:行者123 更新时间:2023-12-02 06:53:29 31 4
gpt4 key购买 nike

我尝试从服务器复制一个文件,并在工作时将“我”放入本地空间,如果我在本地主机上尝试这样做,但是当我在服务器上尝试时,标题出现错误:

My.Computer.FileSystem.CopyFile(
Server.MapPath("../../TempDownloads/Template_BOM.xlsx"),
"\\art-fs02\07_ART_ECO\12_Samples\03_Samples_order\999_MoraruVladutBOM_Test\SO-300.xlsx")

我的错误:

Access to the path '\\art-fs02\07_ART_ECO\12_Samples\03_Samples_order\999_MoraruVladutBOM_Test' is denied. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path '\\art-fs02\07_ART_ECO\12_Samples\03_Samples_order\999_MoraruVladutBOM_Test' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path '\\art-fs02\07_ART_ECO\12_Samples\03_Samples_order\999_MoraruVladutBOM_Test' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via `<identity impersonate="true"/>`, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

最佳答案

您似乎没有所需的权限或无法访问文件共享。首先,您应该尝试访问共享文件夹以查看该文件夹是否存在于共享中。只需将文件夹路径粘贴到新的 Windows 资源管理器地址栏即可。

然后您需要授予对该文件夹/共享的写入或其他适当的权限。为此,您需要将应用程序池用户添加到文件夹安全和共享安全选项卡。

关于vb.net - 当我将文本文件复制到服务器上的另一个文件夹时,对路径 ' ' 的访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36998455/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com