Solved

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

Posted on 2014-09-24
11
1,033 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 82

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 82

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 82

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 82

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 82

Accepted Solution

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
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.

707 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