« Previous Next »

Answered Thread: HTTP 500 errors accessing virtual directory

Last post 10-29-2009 6:42 PM by slikchucky. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 10-21-2009, 7:45 PM

    • Russ_Kauk
    • Not Ranked
    • Joined on 10-21-2009, 11:21 PM
    • Posts 3

    HTTP 500 errors accessing virtual directory

    I hope that someone here can help with what should be a simple problem.

    We have a web server running on machine a - let's call it machine a.  From that web server we need to access a share on machine b - let's call it machine b.  We simply want to put pdf documents in the share that can be accessed from a web client via the path http://domain.com/pdf/document.pdf.

    We've created a virtual directory (pdf) in IIS 6.0 that points to the share and can verify that this is set up properly - pointed to a share on a network server and with proper login credentials since we can browse this share just fine from within the IIS manager.

    The problem occurs when trying to access a document via the client as described above.  We get an http 500 error.  The resulting log file entries are as shown below:

    #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2009-10-21 23:14:51
    #Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
    2009-10-21 23:15:02 W3SVC1 10.0.1.24 GET /pdf/111455.1.pdf - 80 - 10.0.1.50 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.1.3)+Gecko/20090824+Firefox/3.5.3+(.NET+CLR+3.5.30729) 500 16 1326

    The subcode 16 "UNC Authorization Credentials" and the Win32 code 1326 "Unknown User Name or Bad Password" would indicate that we don't quite have something set up correctly yet.

    We've added a user IUSR_machinea login to machineb and given this user account read privileges to the share.  We've also gone into the properties for the virtual folder within IIS and certified that Anonymous access is turned on and that the login/password match the IUSR_machinea account set up on machineb.

    We've also tried using the same login/password in IIS for the virtual directory for the anonymous access as what was assigned to the share itself and we've also tried using an admin login/password for the anonymous user and get the same results no matter what we try.  We've tried turning Windows authentication on/off and no difference either.

    I can also verify that if I point the virtual directory to a folder on machina itself that the link from the web client works fine and the document is retrieved as it should be so the problem is definitely related to connecting to the share.

    Can anyone tell us what we are doing wrong?

    Thanks in advance!!

  • 10-22-2009, 10:22 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: HTTP 500 errors accessing virtual directory

    Russ_Kauk:
    given this user account read privileges to the share

    Do you mean NTFS permissions?  IUSR_machinea needs NTFS Read permissions to the physical folder and files.

  • 10-22-2009, 3:41 PM In reply to

    • Russ_Kauk
    • Not Ranked
    • Joined on 10-21-2009, 11:21 PM
    • Posts 3

    Re: HTTP 500 errors accessing virtual directory

    Thanks for your response and sorry I wasn't clear.

    We are using an NTFS filing system and the IUSR_machinea login on machineb has been given read only permissions for the shared folder.

     

  • 10-23-2009, 11:43 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: HTTP 500 errors accessing virtual directory

    You're still not being clear.  : )

    There are share level permissions and there are file system permissions. Share level permissions do not come into play here.

  • 10-26-2009, 11:47 AM In reply to

    • Russ_Kauk
    • Not Ranked
    • Joined on 10-21-2009, 11:21 PM
    • Posts 3

    Answered Re: HTTP 500 errors accessing virtual directory

    Thanks for your willingness to help.  Unfortunately this will have to be left unresolved for the moment.

    My role in this is as a website developer and, although I have some networking experience, my expertise in that area is not as deep as necessary in order to fully answer your questions.

    To solve the issue, the sys admin in this case has decided to move the files to be shared onto a local disk drive rather than continue to pursue using a networked document server.  It sounds like this is just temporary, however, so this issue may creep back up for us again at some point.

    Thanks again!

  • 10-29-2009, 6:42 PM In reply to

    Re: HTTP 500 errors accessing virtual directory

    Russ_Kauk:
    We've created a virtual directory (pdf) in IIS 6.0 that points to the share and can verify that this is set up properly - pointed to a share on a network server and with proper login credentials since we can browse this share just fine from within the IIS manager.

    I have ran into this exact problem several times before. Do not be fooled by the fact that you can browse the directory in IIS Manager. Double check the username / password you used when setting up the virtual directory and double check that the permissions on the remote directory are set up correctly.

    I believe that IIS Manager uses your current account (presumably Administrator, just a guess here) to browse the remote directory, whereas IIS will actually use the account you set up in the virtual directory when you browse it with a web client.

    I have also seen virtual directories get into this state if someone removed and added anonymous access at the root website level, propagating the change down.

    So to summarize -- I would attempt to map a network drive using the same credentials to make sure that the permissions are correct, and I would reconfigure the username / password you use when setting up the virtual directory.

    Hope that helps.

Page 1 of 1 (6 items)
Microsoft Communities