System.UnauthorizedAccessException: Access to the path '\\server\c$\DTA\DTA564348.64U20121217161754.dta' is denied.

When i store the file by running on my local asp.net website it works fine and gets stored on the shared network drive

However when i run this through IIS i get the above error

C# Code

 StrPath = FilePhypath.ToString();

Web.Config

<location allowOverride="true">
<appSettings>
        <add key="FilephyPath" value="\\server\c$\DTA\"/>
  </appSettings>
    </location>
有帮助吗?

解决方案

Your local IIS may be running either using impersonation, or with a user that has administrative access. Have you checked that your IIS user on your remote server has read-write permissions to the file share? If not, check both your app pool user ID, and the folder permissions.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top