I have a MVC application which I'm trying to display through an iframe.
I get following error message:
This content cannot be displayed in a frame
I've googled some and found that I should use a meta tag. I've used it in my shared layout page in my MVC project but its still not working.
<meta http-equiv="X-Frame-Options" content="allow">
Rendered HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="viewport" content="width=device-width"/>
<meta http-equiv="X-Frame-Options" content="allow">
</head>
<body>
</body>
</html>
My iframe:
<asp:Content ID="Content1" ContentPlaceHolderID="MainRegion" runat="server">
<div>
<input type="hidden" name="nSystemId" value="<%= strSystemId %>" />
</div>
<iframe src="http://myServer/Project/Controller/" seamless="seamless" frameBorder="0" height="600" width="400"></iframe>
</asp:Content>