How to download file from NAS using classic ASP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfirdaus377
    New Member
    • Feb 2013
    • 2

    How to download file from NAS using classic ASP?

    Hi there,

    I am new here and still learning about programming. Can anyone tell me about how to download a file in NAS using Classic ASP?

    For an examples information,
    NAS IP: 113.3.103.2
    share folder in NAS/partition: share_partition
    folder: uploadFile

    And here is an examples of snippet code I try.

    Code:
    <%
    Dim fname,path_test2
    fname="test.png"
    path_test2="//113.3.103.2/share_partition/uploadFile/"
    %>
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="doctext">
      <tr>
        <td>&nbsp;&nbsp;<a href="<%=path_test2&fname%>" target="_blank"><%=fname%></a></td>
      </tr>
    </table>
    Can someone of you,as my senior in programmer,teac h me about this.I use this UNC but cannot download the file.The error tell, that 113.3.103.2 not response.Is it means that permission are not apply in IIS for this application to access the NAS?


    edit:
    I already put the impersonations account of NAS in IIS web application authentications .To give access for this application into NAS.

    Thanks in advance for helping me.
    Thank you.
    Last edited by mfirdaus377; Feb 20 '13, 02:59 AM. Reason: Additional info
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Is this for an intranet site or an internet site? Someone on the internet is not going to have access to your intranet's internal IPs. You will have to copy the file a folder on the website's root and link to that.

    Comment

    • mfirdaus377
      New Member
      • Feb 2013
      • 2

      #3
      It is for Intranet site.forgot to tell you that NAS I am using now has an account created to access it.
      examples:
      username: iamuser
      pswd: test2013

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Well, that account doesn't really matter. You're just linking to that location, that requires no permissions. When the user clicks the link, it will use that users permissions to actually go to that location. So unless the user actually has access to that location, they're not going to be able to access it.

        Comment

        Working...