Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
Mixed Content Warnings Over HTTPS

I thought I'd describe a problem (and the solution we tracked it down to be) that came up this week at work.

The last few months at work my team has been building an ASP.net application that has a lot of client side code as well as server side. It was deployed this week to a test production server and was made only accessible over SSL. The site worked perfectly, but when you first arrived there, IE was throwing a Mixed Content Warning, saying that some of the page was not sourced over SSL.

We scratched our heads over this one for a while, wondering what the hell it could be, since it was self contained site that referenced no other locations other than itself. And even when we said no, don't allow the non-secure content, the site worked perfectly.

It ended up that the solution was extremely simple. One part of the page includes a custom treeview control, that obtains child nodes on expansion from the web server via a hidden IFRAME. By default, there was no source location set on it - a location was necessary until you clicked the little [+] image next to the tree node to force an expansion.

So what does IE render in an un-targetted (I don't know if that's a real word, but I like it) IFRAME? It navigates to about:blank of course! The problem with this is that about:blank is definately NOT obtained via https - and hence throws a mixed content warning. We changed the IFRAME to point at a page on the secure site (blank.aspx I believe it's called :) and the warning went away.

The moral of the story? Plug your own hole? No, probably not.

Don't talk to strangers? *shakes head*

Always cover your ass. That might be getting closer.

Ah, I've got it.

So the next time your TV goes on the fritz or your washing machine conks out, turn on all the lights, look in your cupboards or under the bed. Cause you just can't tell. (Come on, name that movie! :)

Posted: Friday, 4 March 2005 5:54 PM by Geoff Appleby
Filed under:

Comments

Bryce said:

Same thing happened to a group in my company a few years ago. They were preparing their web application for release and deployed it to a test servers to run over SSL. They started getting all the mixed content messages. I kid you not, they spent a week trying to track this down. Finally, my group lead asked if I could take a look and see what their problem might be. I hit their test server and viewed the source of the page and noticed several IFRAMES with src="". I didn't really know if it would solve the problem, but I suggested they just point this to a 0 byte file on the server instead. Lucky for me it did.

This was also when that group found out all the trickery they tried to do in order to hide the source of their pages from the users was pointless :).
# March 5, 2005 11:10 AM

Geoff Appleby said:

*laughs* When will people learn, you can NOT hide the source?
# March 5, 2005 11:58 AM

Avi Salomon said:

Well, here I'm, in the same situation, I changed all my Iframes src="Blank.aspx",
But still once in a while, like magic, the "mixed content" message appears mysteriously. I just can't find the problem… it's randomly in the system, not in a particular page… any suggestions?
# May 24, 2006 6:58 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Geoff's hand
  • Geoff's mother (normal)
  • Geoff's big sister's tongue
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS