Solved

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

Posted on 2014-09-24
11
1,057 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 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
 
LVL 52

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
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 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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now