Sharepoint - Silverlight - caching problem
I have a Sharepoint 2007 site (Custom Template) . The data entry forms are created in Silverlight and host it on Sharepoint. I use a User Control hosting webpart and host the XAPs. To be in details : I place the XAP under _layouts. I create a user Control and place at _ControlTemplates and use a Object Tag in the User Control and refer to the XAP. Now on the Sharepoint page I add a (Custom) User COntrol hosting Webpart , refer the User Control (.ascx) , so that my XAp is hosted on the Sharepoint Site. Problem Statement : I face a refresh problem when I deploy the XAP to _Layouts. When ever I deploy , if I replace my existing XAp with the latest XAP, the changes in the latest XAP are not being reflected immediately. i have to restart my Server for the latest XAp changes to be visible. Instead Ii am creating a new Folder in _layouts , every time I deploy the XAP and updating the reference path in the UserControl(.ascx) to this XAP, which works. What is solution so that I dont create folders every time i deploy ? Can anyone please help. How can I get rid of this caching / history problem. D V Suman Gupta
October 9th, 2010 8:35am

Hi, In my opinion, if you change the web.config file, the pages will recompile when new requests come. So, please save the XAP path into web.config file and use it through the web.config path. whenever you update the XAP, please change the XAP name to XAP-1.0.0 or something and then change the XAP path in web.config. Hope it is helpful! Seven
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2010 12:21pm

Thank you for the solution. Will try as you said .Suman
October 18th, 2010 8:40am

Hi Suman, I suggest to read this arcticle and adopt approchs like this one <object id="Xaml1" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <% string orgSourceValue = @"ClientBin/SilverlightApp.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); %> <param name="onError" value="onSilverlightError" /> HTH Marco Rizzi @Avanade Italy
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2011 10:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics