Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View source

Status
Not open for further replies.

Bravogolf

Programmer
Nov 29, 2002
204
GB
I understand ASP is server side and you cannot therefore view the source code. However, there must be some way of viewing ASP source code!

For example:
Code:
[URL unfurl="true"]http://www.asp101.com/samples/viewasp.asp?file=index%2Easp[/URL]
The line allows the ASP101 domain to view the source code of any ASP file provided that it's within the same directory, but what if you want to change the directory, does anyone know how to get that to work?

Or is there a software (like Dreamweaver, for example) whereby the user can import an ASP file with all the source code?

Or a debug function that allows users to view the source code?

Basically, is there anyway to view ASP on another domain!?
 
That is probably done by a custom script that reads the the file's text and displays it. IIS by itself doesnt' allow this - it's something you have to write for yourself. And no, it's virtually impossible to view the sourcecode of files that YOUR webserver oes not have read access to.

[pipe]
 
For security reasons, no, there is no way to do it. You'd be potentially exposing all kinds of vital security information by exposing the raw ASP code.
 
that'll be this Code Sample then for the way that ASP101 do it.

Unless the source is made available, you can't download it WinNet Mag Article on how to enable it.


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
So, under normal circumstances asp code is secure from public access? But, is anyone aware of any "tools" generally available that would give somebody unauthorized access to asp source? Being paranoid, I always try to write special read only views to provide data through asp pages, just so my real table and field information wouldnt be available to anyone trying to "hack" in.. I never really researched just how vulnerable the source code really was.


 
No, source code isn't viewable unless you, yourself provide a way for a user to view it. If you use includes that do have use the .asp suffix (like .inc) that IS viewable, and this should be discouraged. If you utlize stored procedures correctly (as opposed to using sql) there shouldn't be a huge concern. This techniques behind properly/safely utilzing stored procs are largely dependant on what DB you use....If you use oracle, go over to asktom.oracle.com and search for "sql injection" If not, jsut google sql injection and your database and see what you get..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top