• Create a folder to view from website (2003)

    Home » Forums » Developers, developers, developers » Web design and development » Create a folder to view from website (2003)

    Author
    Topic
    #449609

    Is any way to view a folder (Locate at webserver) from the website?

    Users would like to view a folder that locate at webserver by click a link on one of web page, so I put the folder in the webserver and create a label with link to the folder. But I get the error page: You are not authorized to view this page.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1102814

      Most web servers now are configured by default to prevent directory browsing. You almost certainly can turn off that protection for a particular folder, but I’m not sure whether you can turn it off just for one user.

      For Internet Information Services (IIS), Microsoft has published an article on how you can simulate directory browsing with an ASP page. This might be easier than changing the actual directory permissions if you are using an external hosting provider. However, I haven’t tried it myself. See: Creating a directory browsing page using ASP (MSKB 224364).

      If you are using Apache, then of course ASP isn’t a good choice. Googling for directory browsing apache probably will provide much better results than I could give.

      • #1102825

        Thanks. That’s really helpful information.

        I have tried the Microsoft’s ASP page. How can I hide the default.asp that appears in the contents the folder?

        Thanks

        • #1102828

          > I have tried the Microsoft’s ASP page. How can I hide the default.asp that appears in the contents the folder?

          Well, I think you need to choose your approach. Either you disable directory browsing and have default.asp do the work, or you enable directory browsing and delete default .asp. Does that make sense?

      • #1105463

        Hi,

        I am using the following ASP codes and able to create a directory browsing page. However, I have a big problem: User doesn’t have any problem to view the file from this page. However, if user is not on company domain, and then a windows prompted for a username & password in order to open the file, even if user on the company network.

        Set objCollection = objFolder.Files

        For Each objItem in objCollection
        If Lcase(objItem.Name) “default.asp” then
        Dim strTitle
        strName = objItem.Name
        If strName = “install.exe” then
        strTitle = “System Install File”
        Else
        strTitle = strName
        End if
        strFile = Server.HTMLEncode(Lcase(strName))

        intSizeB = objItem.Size
        intSizeK = Int((intSizeB/1024) + .5)
        If intSizeK = 0 Then intSizeK = 1

        strAttr = MakeAttr(objItem.Attributes)
        strName = Ucase(objItem.ShortName)
        If Instr(strName,”.”) Then strExt = Right(strName,Len(strName)-Instr(strName,”.”)) Else strExt = “”
        dtmDate = CDate(objItem.DateLastModified)
        %>

        K

        This doesn’t happen with other files on my regular html pages.

        Please help!!!

        • #1105492

          What kind of security applies to this site? Windows integrated authentication? Anonymous access? Perhaps the settings are different on the files than they are on .asp pages.

          Also, do the paths in your page as rendered appear to be valid “relative” URLs?

    Viewing 0 reply threads
    Reply To: Create a folder to view from website (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: