Click here to Skip to main content
15,891,012 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to display the part of a web site in may web site. the link of web site is

[LNK]

i want to just show the LIST of "Annotation Summary Results" in my web site.

What I have tried:

I have Tried

<pre>&lt;iframe src="http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=summary">
&lt;p>Your browser does not support iframes.&lt;/p>
&lt;/iframe></pre>

and

-page.aspx
&lt;asp:Literal ID="tm_lit" runat="server"></asp:Literal>

-page.aspx.cs

WebRequest wrq = WebRequest.Create("https://www.w3schools.com");
WebResponse wrs = wrq.GetResponse();
StreamReader sr = new StreamReader(wrq.GetRequestStream());
string sHTML = sr.ReadToEnd();
sr.Close();

if (sHTML != string.Empty && sHTML != null)
{
tm_lit.Text = sHTML;
}


but both techniques through the same error as below

1)
Refused to display 'http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=summary' in a frame because it set 'X-Frame-Options' to 'sameorigin'


2)
Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE
Posted
Updated 4-Jun-17 2:18am

As you can see X-Frame-Options has the value 'sameorigin' and that means, you can not include that page inside a frame that not from the same origin (domain)...
As the site belongs to someone else, you can't do anything you want without permission (maybe to protect intellectual property)...
While there are other possibilities to include information (not as web page, but as HTML) from other side it would be wise to respect the owner and not to push hard (or maybe contact him to see what they say)...
 
Share this answer
 
Comments
jawad ahmed 4-Jun-17 8:47am    
@Kornfeld Eliyahu Peter: is that possible to convert that HTML into Web Page?
Kornfeld Eliyahu Peter 4-Jun-17 8:55am    
As I told - it has a moral aspect to... If you wish to ignore that, you are on your own...
[Solved]

The solution is to install a browser plugin.

A web site which issues HTTP Header X-Frame-Options with a value of DENY (or SAMEORIGIN with a different server origin) cannot be integrated into an IFRAME... unless you change this behavior by installing a Browser plugin which ignores the X-Frame-Options Header (e.g. Chrome's Ignore X-Frame Headers).
Ignore X-Frame headers - Chrome Web Store[^]

Note that this not recommended at all for security reasons.
 
Share this answer
 
v2
Comments
Richard Deeming 6-Jun-17 10:22am    
OK, so that solves the problem on your computer - although it's left you more vulnerable to phishing / click-jacking attacks.

What about your users? Are you going to expect everyone who visits your site to just trust you and install a browser plugin just to view your page?

And what if they're not using Chrome? Are you going to tell them that they have to download and use a specific browser before they can view your page?

Even discounting the legal issues around what you're trying to do, I doubt you'll get many visitors who'll actually follow your instructions.
Not accepting open tha page net:error- blocked-by-response
 
Share this answer
 
Comments
CHill60 12-Jun-20 6:01am    
This is not a solution. Was it meant to be a comment against a solution - use the "Have a Question or Comment?" link next to that solution.
Was it meant to be a question - use the red "Ask a Question" link at the top of this page - and be sure to read the posting guidelines there

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900