Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.NET Alternative to iFrame to hide URL (Server-side Include?)

Posted on 2014-09-24
11
Medium Priority
?
1,315 Views
Last Modified: 2014-10-02
Hello,

I am looking for a solution (ASP.NET + VB) where I can include an external URL within an asp.net page.  I am basically looking for something similar to an iFrame except I don't want the user to be able to open the frame in a new window and get the URL.  The URL needs to be private/hidden.

I've seen examples of this in PHP I believe.

I know you can use javascript to block right-clicks and such but you can still view the source and that's a bit of a clunky / poor implementation.  Any ideas would be greatly appreciated.  

Thanks!
0
Comment
Question by:adrian78
  • 5
  • 4
11 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40342898
There isn't any method to block viewing the source code of a page that is currently in the browser.  In PHP, you can 'include' or use 'file_get_contents' to get the source of another page/file and put it in the current page.  But that does not hide the source.
0
 

Author Comment

by:adrian78
ID: 40342905
Sorry - I don't mean hide the source.  I meant hide the URL.  Grabbing the source is OKAY… I just don't want the URL of the external page to be known.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40342928
I'm sure that VB.NET has a method for doing that but a quick search doesn't show what it is.  The biggest problem may be how the remote page is designed.  If it runs a lot of CSS and javascript to display correctly, it may not work to just 'include' it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 668 total points
ID: 40343004
Is the url on the same domain where you can use an include file?  Or if you have legal rights to scrape, you can use xmlhttppost or at least I know you can use that in vbs. I'm not sure about ASP.NET / VB.  After a little searching, I think it is httpwebrequest that is equivalent.  http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.110).aspx

It would not be typical that you have permission to do this though.  As example, trying to grab content from a travel or real estate site will have restrictions.  If it is a site you control, an include file would be the way to go if it is on the same server.
0
 

Author Comment

by:adrian78
ID: 40345044
No, the URL is on a different domain.  The page is dynamic and visitors interact with the page so scraping wouldn't work.   Basically, a partner is providing the tool for us to use in our paid-members-only area… so I don't people that aren't paid members to be able to access it.
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1332 total points
ID: 40345106
Then I believe you're stuck with an iframe.  Anything else you do will cause the interactive links to try to access your site and Not your partners site.
0
 

Author Comment

by:adrian78
ID: 40346942
Oh that's too bad.  What's the best approach for minimizing how easier it is to find the iframe URL?  Not sure if there is a way.  Maybe disable right click?  Haha not sure.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40346961
I'm pretty certain that you can't hide it from me.  If you disable 'right-click', then I'll use "View Source".  Or I can view the headers to see what sites you are connecting to.  It has to be 'readable' for the browser to use it to connect.
0
 

Author Comment

by:adrian78
ID: 40347049
Ya, I guess at the end of the day if someone is trying to find out, they'll be able to… but for most, they may not even know since it's not targeting a technical audience.
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1332 total points
ID: 40347152
I agree with that.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question