Click to See Complete Forum and Search --> : download asp file with source code


r_Ganesh
June 9th, 2002, 11:32 AM
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)?

Zvona
June 10th, 2002, 02:44 AM
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. :eek:

r_Ganesh
June 10th, 2002, 11:58 AM
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

r_Ganesh
June 14th, 2002, 11:18 PM
i got the answer for downloading any type of file from the server. Please refer www.asp101.com for more details.

Akim
June 18th, 2002, 05:54 AM
A little OT,
Is it possible to read an external html page (not ASP) into a string without opening that page?

commando106
December 13th, 2007, 07:08 AM
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

PeejAvery
December 13th, 2007, 07:28 AM
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.

commando106
December 13th, 2007, 08:13 AM
Thanx alot peejAvery will take anote of that....

KrisSimonis
December 13th, 2007, 09:40 AM
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.

PeejAvery
December 13th, 2007, 10:03 AM
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.