Solved

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

Posted on 2014-09-24
11
1,201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
11 Comments
 
LVL 83

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 83

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
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.

 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 167 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 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 333 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 83

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 83

Accepted Solution

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

Featured Post

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!

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
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.

624 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