Is it possible to use iframe with localhost address in source ?

Try using your machine's actual IP address (typically 127.0.0.1)...

<iframe width="800" height="800" src="http://127.0.0.1:69345/Handler.ashx"/>

Don't forget the port number!

P.S: On Mac OS you can run something like ifconfig | grep inet or ifconfig | grep 127 to identify your network IP address.


When Chrome shows the following text in the iframe:

127.0 0.1 refused to connect

It's because the server responded with the X-Frame-Options header to DENY.

The solution is to change the server configuration so that it removes this header or sets it to SAMEORIGIN.

For example, if you're using a Django, you can either change the X_FRAME_OPTIONS setting or decorate your view with @xframe_options_sameorigin or @xframe_options_exempt.


Don't use absolute url

use relative

....
<iframe width="800" height="800" src="Handler.ashx"/>
...