How to integrate an external application in iframe - asp.net

I'm working on a project and I want to integrate an application called what'sup gold. Here is my code below:
<iframe height="300px" width="100%" src="http://localhost/NmConsole/#discover/p=%7B%22fullScreen%22%3Atrue%7D">
app1
</iframe>
the problem is when running the code I got these errors:
Refused to display 'http://localhost/NmConsole/#discover/p=%7B%22fullScreen%22%3Atrue%7D' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
And
Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE
Can anyone explain what the problem is exactly and how to go about resolving it?

ERR_BLOCKED_BY_RESPONSE means the resource (the app that you are trying to get) is not allowed to run under another domain. So unless you have full control over the domain in which the original app runs, there's no way to display it under your own domain.

Related

Validation of Viewstate MAC failed (Shared hosting Plesk)

I am using plesk'shared hosting server to host my website. Constantly getting ViewState MAC failed error
Plesk won't be able to provide any Machine Key. As it is shared hosting.
I have also attached the screenshot. please help.
Earlier This issue was coming in one page only. I have resolve it by converting it to JavaScript and ajax call in order to Stop AutoPostBack.
But now this is coming in many pagaes.
Add following link in your web.config file.
Above line should be included within section.
OR
if you don't want this solution to implemented on project level then you can add these attribute to the page(Top most line of HTML view) directive of the page which is creating issue.
That means you have to add enableEventValidation="false" viewStateEncryptionMode="Never" in page directive.

iframe displays "refused to connect" for Grafana

I am using grafana version 6.5.3 and I am trying to make a grafana dashboard be displayed in an iframe on a webpage in my blazor server app. The iframe is rendered but displays the following message "xxx.xxx.com refused to connect".
<iframe src="http://xxx.xxx.com/mygrafanacharts"
frameborder="0">
</iframe>
The Grafana server is configured with
allow_embedding = true
I have no clue if the Grafana server is not configured correctly or if there is some configuration that needs to be changed on my website.
I encountered the same problem and was sure, I changed the
allow_embedding = true
setting, but when I wanted to confirm this and looked under http://[yourGrafanaServer]/admin/settings
I saw, that it was still false.
When I opened the grafana.ini, I realized, that I had forgotten to remove the ; at the start of the line to uncomment the setting. After doing that, the iframe worked fine!
Maybe this was the issue here too.

Iframe code doesnt display website

When I put into html file this code, it does not show website.
<iframe src="https://www.ge-tracker.com/names/claws">
Can somebody help?
It is because your target site to put into the iframe does not allow itself to be loaded into an iframe that is hosted on a a different domain. It uses the X-Frame-Options http header to advise this to any browser that requests it.
You can examine this by looking at the error console in your chosen browser.
For instance, using Chrome, you will see:
Refused to display 'https://www.ge-tracker.com/names/claws' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, SAMEORIGIN'.

404:signalr/hubs for signalR chat application

I am trying to create a chat application using signalR using VS2012 web in a website.
But its showing me error like this:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:50780/WebApplication1/WebApplication1/signalr/hubs
Uncaught TypeError: Cannot read property 'client' of undefined
I have added RouteTable.Routes.MapHubs(); to Global.asax
But why should its showing me this error when its opening for other's system.
On the page where you're including signalr/hubs:
Change your script tag to look like this:
<script src="~/signalr/hubs"></script>
#drch's answer is also correct (if you're making that mistake) but the more common issue I see is people just doing "signalr/hubs" in their script tag and then the hubs url is then incorrect (in some circumstances).
Ultimately the hubs url resides off of the SignalR endpoint so doing a "~/signalr/hubs" makes the path app relative which should ensure that it retrieves the hubs.js from the correct url.
I know, that I'm late, but for smbd who will finding answers:
I've resolved the problem by registrate .Net frame work to IIS.
Do next steps into console (Win+R):
cd %windir%\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe –i
Source

AS3: Security sandbox violation

I want to go live with my site.
...but I need help with a security violation I am incurring.
I've seen various threads on this forum regarding a crossdomain.xml file to include and link to, but I don't get it... no matter what I try I still end up with the same result. You'll note below that it is not recommended to use crossdomain hacks.
FWIW, this only happens when I export a release build... I can load the php data w/out an issue in my debug/developing phase locally in Flex.
What gives? When I make a PHP based request for data I always get this error popping up:
Error #2044: Unhandled securityError:.
text=Error #2048: Security sandbox
violation:
http://alubow.com/jml_testing/viewable/alubow_project.swf
cannot load data from
http://www.alubow.com/jml_testing/foldergrab.php?ipath=assets/bitmap/portrait_thumbs/&tpath=assets/bitmap/portrait_imgs/.
at utils.php::DirectoryReader() at
alubow_project/newScroller() at
alubow_project/mainClickOut()
Is there code I need to add to get this to work? Do I need to configure the server I am using?
I will need to go live with this site soon and these errors I am getting both locally and serverside (via a browser) are unacceptable.
COULD THIS BE A PROBLEM WITH THE FLASH PLAYER I HAVE INSTALLED?
I have the debugger version of flash player 10.
jml
The problem is with the www prefix. I guess you are trying to load a page with out the www subdomain and the URL you are looking for does have that prefix.
Now, what you need to do is one of the following:
change the request url
add both www.yourdomain.com And yourdomain.com to the crossdomain.xml
call the url dymanicaly. this is the best solution but needs some more work. you can get it done using ExternalInterface and connection to JS here. OR you can use the BrowserManager.
Enjoy!
It may be because your app is requesting from www.alubow.com when hosted from alubow.com, which triggers a request for http://www.alubow.com/crossdomain.xml, which doesn't exist. You could refer to your app as www.alubow.com/jml_testing/viewable/alubow_project.swf and avoid the error.
Alternately, you could add a crossdomain.xml file to www.alubow.com.
I know this is weird but for local files loaded through the flash player you probably just need to hit this page. Look near the top right for something that looks like an example image. It's actually a Flex application. Click successive tabs until you read the Global Security Settings panel (currently 3rd from the left, with an image of a globe and padlock). Select the "Edit locations" menu, and choose "Add location". You can then add your swf or your folder of swf's into the whitelist and they'll be able to access outside resources magically.

Resources