CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2002
    Location
    Chennai
    Posts
    7

    download asp file with source code

    I need to download the asp files with the full source code.

    I tried the following code:

    <A HREF="view-source:http://Server name/Virtual directory/a.asp"> click to download file </A>

    This code is executing the ASP file and giving the output. How do I download the ASP file with full source code (or without executing the file)?

  2. #2
    Join Date
    Jan 2002
    Location
    Helsinki, Finland
    Posts
    99
    It'd not be nice, if one could download raw documents with server-side code. All server-side code between the document and server can't be viewed externally, when using clients. If you can access to the server and view it's files, then it'd be possible to gain access to server-side code. That'd be considered as hacking, though.
    Zvona - First aid for client-side web design

  3. #3
    Join Date
    Jun 2002
    Location
    Chennai
    Posts
    7
    This is not inteneded to hack. My source code will be in the server. whenever i have to modify the files i need to check out the files from server, do the modifications and submit the file back. this is a requirement for our product.


    For more information of the product please visit
    www.iPlanEnterprise.com

  4. #4
    Join Date
    Jun 2002
    Location
    Chennai
    Posts
    7

    Red face Downloading files!!!

    i got the answer for downloading any type of file from the server. Please refer www.asp101.com for more details.

  5. #5
    Join Date
    Mar 2002
    Location
    NY
    Posts
    236
    A little OT,
    Is it possible to read an external html page (not ASP) into a string without opening that page?

  6. #6
    Join Date
    Dec 2007
    Posts
    2

    Re: download asp file with source code

    Hey Ganesh Iwas wondering if u can tell me how u managed to download the files I am also facing similar problem and need some help kindly reply

  7. #7
    Join Date
    May 2002
    Posts
    10,943

    Re: download asp file with source code

    Welcome to the forums commando106. When you have a problem, please create a new thread rather than posting on someone else's topic. You will notice that this thread is 5+ years old.

    As concerning your problem, it is impossible to read the ASP source code without having direct access to the host. You can't download nor read it for many reasons.

    1. The server is made to execute it before passing it to the client.

    2. That would be a HUGE security breach if anyone could read any server-side code.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  8. #8
    Join Date
    Dec 2007
    Posts
    2

    Re: download asp file with source code

    Thanx alot peejAvery will take anote of that....

  9. #9
    Join Date
    Sep 2006
    Posts
    95

    Re: download asp file with source code

    You could use a wrapping page that reads the page you want to download and forces it to a file to be downloaded. I'm not that good at HTML, but I know it's possible. That way, it would be forced to read the asp page as a file instead of trying to execute it.
    On Error Kill(User)

  10. #10
    Join Date
    May 2002
    Posts
    10,943

    Re: download asp file with source code

    Now that makes me think. This thread is unclear.

    As I understood it, the person is trying to download server-side code from someone else's server. If this is the case...it cannot be done.

    However, it could be trying to make your own server download server-side code.If this is the case...you can do KrisSimonis' idea. It is called a force download. Usually this is done by having another file, usually named download.ext which reads the file.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured