Link to home
Start Free TrialLog in
Avatar of ryoxthimer
ryoxthimerFlag for United States of America

asked on

Flash Content Not Loading IE8/IIS 7.5

I'm having an issue with Flash content loading from IIS 7.5 into Internet Explorer 8.  Here is my setup:

Server: Windows Server 2008 R2, IIS 7.5
Clients:  Internet Explorer 8 and Firefox 3 (various OS)
Flash Content Page: http://www.faithchurch.net/newsite/slidenav/

The issue: This content loads fine in Firefox, but does not in IE.  IE just sits at the little spinning circle like its loading the flash content.  I believe Google Chrome does the same thing as IE. The VERY strange thing is if I move this content to ANY other server (Linux, Windows, etc) it will load just fine in both browsers.  I even have another Windows Server 2008 R2 server with IIS 7.5 and it serves up fine using bother browsers.  So... There seems to be something wrong with my server configuration, but I have no idea why the issue is only in one or two browser types.

This is a doozie since procmon traces on the problem server of the browser requests look identical for both Firefox and IE (I'm monitoring w3wp.exe).  There are no failed requests logged.  I would like some help with troubleshooting this issue since I can't seem to find a unique behavior on the server side with one browser versus the other.

One special thing to note... The server having the problem was upgraded from Server 2008 to Server 2008 R2 while IIS was in production.
Avatar of IqAndreas
IqAndreas
Flag of Sweden image

That is REALLY strange.

My results matched yours, I was able to play the SWF in FireFox, but not on Chrome. It's not an embed issue, since the problem remains even if I open the SWF file directly without the HTML wrapper.

Are you sure it is a server side issue? Could you post some of the code you are using?

Now and again some have problems with URLRequests in their ActionScript, where if they have the full name written out it does not work, while if they use relative directories, it does work. Or maybe it was the other way around.

But if you are using any sort of URLRequest, try switching between writing the urls in these two ways:
new URLRequest("http://iqandreas.isbetterthanyou.org/myimage.jpg"); //Absolute directories
new URLRequest("/myimage.jpg"); //Relative directories
Give both options a try, and reply back if there is any difference in the resulting SWFs when tested on the server.
Avatar of ryoxthimer

ASKER

The reason I think its a server issue is this is not an issue on ANY other server I try this content on.  Its the only logical conclusion I could come to. Try http://www.ministryprofile.com/slidenav/   This is a hosting service, presumably using Linux server.  Same exact content.

Granted, I know next to nothing about Flash, so I appreciate the insight.  This flash item was purchased at www.flashcomponents.net and is customized through an XML file.  I do have Adobe Flash, so I could poke around in the FLA file.  I'll post what I find.
Yep, if it's loading in the XML which updates the content, chances are that's where the error is. :P

Just to correct a small mistake, I accidentally included a forward slash character which was not supposed to be there:
new URLRequest("http://iqandreas.isbetterthanyou.org/myimage.jpg"); //Absolute directoriesnew URLRequest("myimage.jpg"); //Relative directories

Also make sure the XML is in the same directory and the same server as the SWF. Otherwise you will need to mess around with crossdomain files, and that can get quite annoying...
The problem is in your XML - you can't have two root nodes
( <appeareance> and <content>) try wrapping them like:


<?xml version="1.0" encoding="utf-8"?>
<root>  <appeareance>
   ....
  </appeareance>
  <content>
   ....
  </content>
</root>


Best,
Jakob E
Thanks for the responses.

@Jakob - I tried wrapping all nodes with <root> and the Flash component would not load at all in Firefox - just gray screen.  Same result as before in IE (spinning circle).

@IgAndreas - If the error could be in the XML file, why would it be failing when served from this one server only?  I would think the server wouldn't care what's in the XML file if the SWF is the item reading the contents.  <shrug>

I'll keep poking around...
I don't believe there is a problem with the actual XML per se (though, Jakob E may have a valid point) but I was trying to say that the error likely occurs where Flash tries to load in the XML, and the two browsers may treat relative and absolute directories differently.

If you could post the code for the loading in of XML (and whatever other items you may load in with URLRequest) it would be a lot easier to find out if that is where the problem lies. When you have found that part of the code, change it from absolute to relative (or vice versa) and see if it makes a difference.
I'll just post the entire package and take it down when we are done...  That way you can see everything that is going on.

http://www.faithchurch.net/newsite/slidenav.zip
Hi,

If you do a simple test like this:

     var ldr:URLLoader=new URLLoader();
     ldr.addEventListener(Event.COMPLETE,completeHandler,false,0,true);
     ldr.load(new URLRequest("content.xml"));
   
    function  completeHandler(e:Event):void{
        var xml:XML=new  XML(e.target.data);
        trace(xml);  
    }

You'll  get an error "... The markup in the document following the root element must be well-formed...."

When you wrap the nodes you  should also change the way the XML is
 parsed in actionscript... I think this is the first step :)


 
 Best,
 Jakob E

ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Eureka!  It had to do with gzip compression on the server.  Once I excluded application/x-shockwave-flash MIME types from HTTP compression in IIS, the SWF loaded.  This is evidently a common problem on many server types.

Using the IIS configuration editor, I went to system.webServer/httpCompression and set the MIME type "application/x-shockwave-flash" to FALSE on both staticTypes and dynamicTypes.

I believe the reason my other IIS 7.5 server was working is because it was a fresh install of Server 2008 R2.  The upgraded/production server's compression config (specifically, what MIME types are being compressed) is very different from the fresh install.

Thanks to all for the help.