Accesing data from NAS on IIS server

0

I am trying to show images from my NAS on my website that is running on an IIS server. I have made a virtual directory and i have successfully linked my nas to the server. Now everytime i try to load an image onto my html page i get the error: "HTTP Error 500.19 - Internal Server Error" errorcode: 0x80070005

i've read online that this means that i don't have acces to the file... Does anyone know how to fix this? I have tried so many different things but it still wont work.. I have been searching on this problem for the last couple of days.

thanks in advance!

javascript
php
html
iis
nas
asked on Stack Overflow Apr 19, 2021 by RobTer

1 Answer

0

This problem occurs for one of the following reasons:

  • You're using IIS on a computer that is running Windows. Additionally, you configure the website to use Universal Naming Convention (UNC) pass-through authentication to access a remote UNC share.
  • The IIS_IUSRS group doesn't have the appropriate permissions for the ApplicationHost.config file, the Web.config file, or the virtual or application directories of IIS.

Resolution

Use one of the following methods:

  • Don't configure the website to use UNC pass-through authentication to access the remote UNC share. Instead, specify a user account that has the appropriate permissions to access the remote UNC share.
  • Grant the Read permission to the IIS_IUSRS group for the ApplicationHost.config or Web.config file. To do it, follow these steps:

1.In Windows Explorer, locate the folder that contains the ApplicationHost.config file that is associated with the website, or locate the virtual directories or the application directories that contain the Web.config file that is associated with the website.

  • Note

    The Web.config file may not be in the virtual directories or the application directories in IIS. Even in this situation, you have to follow these steps. 2.Right-click the folder that contains the ApplicationHost.config file, or right-click the virtual or application directories that may contain the Web.config file.

3.Select Properties.

4.Select the Security tab, and then Select Edit.

5.Select Add.

6.In the Enter the object names to select box, type <computername>\IIS_IUSRS, select Check Names, and then select OK.

Note

<Computername> is a placeholder for the computer name.

7.Select the Read check box, and then select OK.

8.In the Properties dialog box for the folder, select OK.

  • Note

    Make sure that the folder properties are inherited by the ApplicationHost.config and Web.config files so that IIS_IUSRS has the Read permission for those files. Here is the reference: HRESULT code 0x80070005

answered on Stack Overflow Apr 20, 2021 by Theobald Du

User contributions licensed under CC BY-SA 3.0