469,647 Members | 1,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Alter the HTML output before it's sent to the web browser, possible?

Hi,

Long story short: I've got a website built, and we moved it over to the
production server, which is an SSL-required (https://...) server.
A third party component that I'm using makes use of an <iframe>.
Unfortunately they set the SRC attribute to "".

This causes Internet Explorer to display a message box dialog warning about
this page contains non-secure and secure items, do you wish to display the
non-secure items, Y/N?

Very annoying as it happens on every page transition and having the
end-users switch their IE settings is not an option.

After some Googling, I discovered the ASP.net 2 menu control has the same
issue and Jerry Orman has the problem/solution listed on his blog:
http://blogs.msdn.com/jorman/archive...06/526087.aspx

I contacted the 3rd party component vendor and they confirmed this issue was
a bug.

I'm not sure how long it's going to take them to fix the bug, and I need it
yesterday.

So, I'm wondering if this solution is possible and if so, how/where would I
do it?

I would like to capture the HTML output right before ASP.net hands it off to
IIS which sends it to the web browser.

And in that event where I capture the rendered HTML, do something like:

theHTMLOutput = theHTMLOutput.ToString().Replace(" src=\"\" ", "
src=\"https://mysite.com/blank.htm\" ")

Is it possible? Any tips/suggestions/code?

Thanks,
Brian
Jul 19 '07 #1
2 1392
Dino Esposito has an excellent post that explains exactly how you can do this:
http://weblogs.asp.net/despos/archiv...01/145436.aspx
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com

"Brian Simmons" wrote:
Hi,

Long story short: I've got a website built, and we moved it over to the
production server, which is an SSL-required (https://...) server.
A third party component that I'm using makes use of an <iframe>.
Unfortunately they set the SRC attribute to "".

This causes Internet Explorer to display a message box dialog warning about
this page contains non-secure and secure items, do you wish to display the
non-secure items, Y/N?

Very annoying as it happens on every page transition and having the
end-users switch their IE settings is not an option.

After some Googling, I discovered the ASP.net 2 menu control has the same
issue and Jerry Orman has the problem/solution listed on his blog:
http://blogs.msdn.com/jorman/archive...06/526087.aspx

I contacted the 3rd party component vendor and they confirmed this issue was
a bug.

I'm not sure how long it's going to take them to fix the bug, and I need it
yesterday.

So, I'm wondering if this solution is possible and if so, how/where would I
do it?

I would like to capture the HTML output right before ASP.net hands it off to
IIS which sends it to the web browser.

And in that event where I capture the rendered HTML, do something like:

theHTMLOutput = theHTMLOutput.ToString().Replace(" src=\"\" ", "
src=\"https://mysite.com/blank.htm\" ")

Is it possible? Any tips/suggestions/code?

Thanks,
Brian
Jul 19 '07 #2
Hi Peter,

Thank you so much for Dino's blog post. It explained it pretty good, but by
using keywords in his article I was able to find this article with code
samples:
http://aspalliance.com/71

I implemented this technique on my site and it worked like a charm.

Thanks again (you, Dino and aspalliance were my lifesavers today),
Brian

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:A3**********************************@microsof t.com...
Dino Esposito has an excellent post that explains exactly how you can do
this:
http://weblogs.asp.net/despos/archiv...01/145436.aspx
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com

"Brian Simmons" wrote:
>Hi,

Long story short: I've got a website built, and we moved it over to the
production server, which is an SSL-required (https://...) server.
A third party component that I'm using makes use of an <iframe>.
Unfortunately they set the SRC attribute to "".

This causes Internet Explorer to display a message box dialog warning
about
this page contains non-secure and secure items, do you wish to display
the
non-secure items, Y/N?

Very annoying as it happens on every page transition and having the
end-users switch their IE settings is not an option.

After some Googling, I discovered the ASP.net 2 menu control has the same
issue and Jerry Orman has the problem/solution listed on his blog:
http://blogs.msdn.com/jorman/archive...06/526087.aspx

I contacted the 3rd party component vendor and they confirmed this issue
was
a bug.

I'm not sure how long it's going to take them to fix the bug, and I need
it
yesterday.

So, I'm wondering if this solution is possible and if so, how/where would
I
do it?

I would like to capture the HTML output right before ASP.net hands it off
to
IIS which sends it to the web browser.

And in that event where I capture the rendered HTML, do something like:

theHTMLOutput = theHTMLOutput.ToString().Replace(" src=\"\" ", "
src=\"https://mysite.com/blank.htm\" ")

Is it possible? Any tips/suggestions/code?

Thanks,
Brian

Jul 19 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Hayden Kirk | last post: by
6 posts views Thread by Peter Morris | last post: by
2 posts views Thread by Neil Zanella | last post: by
6 posts views Thread by john | last post: by
3 posts views Thread by Smithers | last post: by
14 posts views Thread by asdf | last post: by
33 posts views Thread by MC | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.