开发者

Firefox doens't update Silverlight Application

i have a problem with Firefox and Silverlight. I have a silverlight application (with version-number 1.0.0.0) on my website. Now I have modified the silverlight application(version-number is now 1.0.0.1) and replaced the old file on the server with my new application.

The Internet Explore loads the new application correctly. But unfortunally the Firefox 4 still loads the old Silverlight application.

Is there a t开发者_JAVA技巧rick to fix this issue or have i to rename the xap file on every update?

Than You


May be Firefox cached that xap and load cahced one.
If you wont do load xap every time user opens the page, then replace

 <param name="source" value="ClientBin/YourXapName.xap" />

with this one

        <%
            string orgSourceValue = @"ClientBin/YourXapName.xap";
            string param;    
            if (System.Diagnostics.Debugger.IsAttached)    
                param = "<param name=\"source\" value=\"" + orgSourceValue + "\" />";
            else
            {
                string xappath = HttpContext.Current.Server.MapPath(@"") + @"\" + orgSourceValue;
                DateTime xapCreationDate = System.IO.File.GetLastWriteTime(xappath);        
                param = "<param name=\"source\" value=\"" + orgSourceValue + "?ignore=" + xapCreationDate.ToString() + "\" />";
            }
            Response.Write(param);
         %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜