473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1499
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Hayden Kirk | last post by:
Hey I have a class called page. This class outputs a page in html. Now I have a function called OutPutHtml This outputs html, however I want to be able to do this: outputhtml('<body>...
6
by: Peter Morris | last post by:
Is it possible to use C or C++ to create web pages? Ouputting text with HTML syntax is easy enough, but how do I make a web browser see the generated text?
9
by: Jay Donnell | last post by:
I have a function that is a few thousand lines of code (I didn't write it) and I want to capture the output and save it as a variable. This is very easy to do in php. It would look something like...
5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
2
by: Neil Zanella | last post by:
Hello, Normally default values for passwords are left unspecified. However, the XHTML standard allows them for all I know, so I decided to try coding the following ASP.NET HTML server control on...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
3
by: Smithers | last post by:
Just wondering what it would take to cache a copy of the output HTML from a dynamically constructed aspx page before it is sent to the browser. Reason being: the page is constructed of a few user...
14
by: asdf | last post by:
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks
33
by: MC | last post by:
Hey, I have a need to get HTML from a client back to a server to do server processing. I would like the HTML and form data both. Is there a simple way to capture that? I do not want to submit...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.