?
Solved

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

Posted on 2014-09-24
11
Medium Priority
?
1,269 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 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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 53

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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
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…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
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.

719 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