Unable to get data from remote share through a virtual directory via http

JORGE MALDONADO BARRERA 211 Reputation points
2021-07-06T16:25:42.733+00:00

Hi,

We have a website on a Windows Server 2008 R2 machine and now we are moving it to a Windows Server 2019 Standard. Our website has a Virtual Directory that points to a share in a NAS. The share contains PDFs documents basically. I know that Windows Server 2019 has Guest account access to a remote server disabled by default so I enabled it already. Now I can connect to the shared folder in the NAS from Windows Explorer. I added the website to the new server, created a virtual directory, clicked the Explore button and I can see the content as shown below.

112188-image.png

I can even access PDFs with Google Chrome like this:
file://192.168.168.8/eDocuments/PDFs/77/2014/1/3144_240_4000137_CtaGA.pdf

But what I need is to get the PDFs like this:
http://edocs1.hinojosa.com/PDFs/77/2014/1/3144_240_4000137_CtaGA.pdf

Our website in the old Windows Server 2008 R2 server works correctly when I use the second way. However, the new Windows Server 2019 does not. I get the error below:

112263-image.png

I have been struggling with this issue for 2 weeks and searching for answers but I just cannot get any solution.

As additional information, the NAS supports SMB1 and SMB2. It, in fact, is configured to automatically select the protocol. In this case, I suppose SMB2 is being used because Windows Server 2019 does not install SMB1 by default.

I will very much appreciate your feedback and comments.

Best regards,
Jorge Maldonado

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,450 questions
Internet Information Services
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 31,571 Reputation points
    2021-07-06T19:36:40.527+00:00

    Start by enabling directory browsing just on the PDFs folder.

    http://www.ntweekly.com/2017/07/21/enable-directory-browsing-in-iis-10-and-windows-server-2016/

    Your next issue is going to a question of security. What are your requirements? If you have none and just want to allow anyone on your network to browse the PDF's, then what I would do is to create a local user account on the Windows server and a corresponding local account on the NAS that has the same name and password.

    Then on the PDFs folder, I would set the authentication to anonymous, and replace the IUSR account with the local account that you created.

    112227-capture.jpg

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JORGE MALDONADO BARRERA 211 Reputation points
    2021-07-07T15:32:36.293+00:00

    Thanks for you reply. My issue is now fixed. I had, in fact, enabled Directory Browsing on PDFs Virtual Directory but it was not enough. Adding the new account on NAS and server completed the trick. I really appreciate your feedback.

    With respect,
    Jorge Maldonado

    0 comments No comments