Click to See Complete Forum and Search --> : ASP.Net: Remote Include
PeOfEo
03-25-2004, 05:46 PM
Ok here is what I want to do, Go around some network security by running a server side script that will get the html output for a remote site that I cannot get to. Only problem is I do not think it is even possible to do a remote include (I played around just to see for myself... it failed), so how would i be able to do this. If I could get it in string form and parse it in I would be happy. Any ideas?
buntine
03-25-2004, 07:10 PM
Not possible...
If it was, server side technologies would be very insecure.
Regards.
PeOfEo
03-25-2004, 08:38 PM
It is possible. http://validator.w3.org does it when you validate your page, it does not display the page but it will display the whole source code in the output and it parses it, so it is possible somehow. I just need to know how. Its not like its for a remote file that the server would not send to a client, its for the html output not server side scripts.
buntine
03-25-2004, 08:40 PM
Ahh. Sorry.
I just assumed you were talking about ASP source. I didnt read your post correctly.
Yer, CGI scripts can get the HTML source from your page easily enough.
Regards.
PeOfEo
03-25-2004, 08:43 PM
but what about some asp.net??? I would like to stay away from perl if at all possible.
buntine
03-25-2004, 08:46 PM
Im not sure how its done in .NET.
Though, it would be possible using some HTTP requests or something.
PeOfEo
03-25-2004, 08:46 PM
This is one of those out there things that I will never be able to find and article about! Time to scoure msdn....
PeOfEo
03-25-2004, 09:01 PM
http://www.c-sharpcorner.com/References/ReferencesWebRequest.asp <--- here we go. THIS SUCKS, when I sat down and got to thinking I realized this will not work like I want it to, all of the images, links, style sheets, java scripts, and server side scripts on the page I want to view would break because they would be on a new server and that would change the path because very few developers put in http://, server side would obviously fail because the form action is wrong and it is on another server!
buntine
03-25-2004, 11:21 PM
hmm.. There may be a way around that.
Im currently reading up on .NET technologies as i feel its time i moved on.
I got 'Introducing .NET' by Wrox;)
I will post if anything comes to mind.
PeOfEo
03-25-2004, 11:25 PM
I might be able to rig something that works 80% of the time with regex but it would still be a pain in the butt. I am going to say screw it and try to think of another way behind the school netowkr. I mean if I flood the proxy (local proxy on main network terminal) with requests for a page that is blocked by hitting the back button then forward rapidly (alt then left right) it will eventually let me though but it takes a little time and screws its self when it is a server side redirec so that is a pain in the butt. 8e6 technologies is a whore, they have plenty of holes but all are pain in the butt to exploit!
lazytom
04-29-2005, 02:40 PM
I created a little ASP.NET UserControl that does just that (without the fixing of the links, though).
see here: http://lazytom.com/libraries/remoteinclude/
Although I'd think with some little RegEx magic that shouldn't be too hard to do. I'll think about it...