简体   繁体   中英

Error while storing to a shared network drive when running website on IIS

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM