3

In my asp.net mvc site, I'm loading flash files using swfobject. These files work fine, locally, using Visual Studio 2008 server (F5). But, when deployed to the Test server, they don't load at all. My routing table looks like this:

routes.MapRoute(
    "Default",
    "{controller}.aspx/{action}/{id}/{title}",
    new {controller = "Home", action = "Index",id = "",title=""});
routes.MapRoute(
   "Root",
   "",
   new {controller = "Home",action = "Index",id = "",title = ""});

And I'm loading the swfs like:

<div id="home-container">
    <div id="flash-content" style="outline:none;position:absolute; top:0px">
        <h1>GET THE LATEST FLASH PLAYER TO VIEW THIS SITE.</h1>
        <a href="http://www.adobe.com/go/getflashplayer">
            get it now
        </a>
    </div>        
</div> 
<script type="text/javascript">
    // Embed the SWF
    var flashvars = {}; 
    var attributes = {id: "whole-grains-home", name: "whole-grains-home", style:"outline:none;"};
    var params = { allowscriptaccess: "always", menu: "false", wmode: "transparent", swliveconnect: "true" };
    var flashFile = '<%= Url.Content("~/files/flash/Homepage/R9IN03_PostH&W_Homepage.swf") %>';
    swfobject.embedSWF(flashFile, "flash-content", "990", "538", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>

I'm suspecting that root route is to blame, but I just can't figure out why this works locally, but not on the server.

Anyone have any ideas?

Thanks.

2
  • 1
    If the content is statically available then it should be served ahead of dynamic content, this may be an IIS issue. Have you tried just loading the flashFile URL (as generated into the page by Url.Content, in view source) straight into the address bar to see if you get any error back? Commented Dec 8, 2009 at 21:27
  • I tried that and it didn't work. Then, I noticed that one of my files did work. I then looked at that file, as compared to the others and noticed that the ones that did NOT work had & in their filename (like the example above). Taking that out seems to have solved this issue. Commented Dec 8, 2009 at 22:09

1 Answer 1

1

I noticed that one of my files did work. I then looked at that file, as compared to the others and noticed that the ones that did NOT work had "&" in their filename (like the example above).

Taking that out seems to have solved this issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.