在我的asp.net mvc网站中,我使用swfobject加载flash文件。这些文件在本地使用Visual Studio 2008服务器(F5)时可以正常工作。但是,当部署到测试服务器时,它们根本不会加载。我的路由表如下:
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 = ""});
我正在加载swf文件,代码如下:
<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>
我怀疑根路由有问题,但是我无法理解为什么这在本地可以工作,而在服务器上却不能。
有人有任何想法吗?
谢谢。