views:

321

answers:

2

This may be a security issue...

I have an IFrame on my page w/ an .ashx src. The handler does something like

context.Response.ContentType = "text/html";
context.Response.Write(@"hello world");

If I navigate to the handler directly in a new browser window I see the "hello world"

If I try to open the handler in the IFrame it fails on IE. The handler is invoked but the response is refused.

It works fine in FireFox.

edit: if I change the IFrame src to be an aspx page it works fine

A: 

We do a similar thing in our appliation. We have an IFrame with an html page as the source, and then in the html page the "action" of the form points to a handler. Maybe if you post more of a sample of what you are doing, it could be of greater help.

A: 

Are the two pages (the container and the iframe) on the same URL? If not, IE may be doing something to block it as a prevention against XSS.

Jon Grant
The domain of the urls are the same.