Silverlight XAP Files Are Not Updated

We are launching the commercial Silverlight application. When we update our site in IIS, some of our users must clear their browser history in order to receive the latest updates.

This is stupid, as you can imagine.

If they donโ€™t clear their browser history, some of the users will get it.

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E; BRI/2) Timestamp: Thu, 16 Jun 2011 02:41:49 UTC Message: Unhandled Error in Silverlight Application Unable to retrieve the module type Car.CarList.InitModule, Car.CarList, Version=1.0.123.17153 from the loaded assemblies. You may need to specify a more fully-qualified type name. at Microsoft.Practices.Composite.Modularity.ModuleInitializer.HandleModuleInitializationError(ModuleInfo moduleInfo, String assemblyName, Exception exception) 

UPDATE: I am starting to understand the problem. Look at the fiddler output,

 /ClientBin/Main.xap?ignore-20/06/2011%209:30:19%20a.m. /ClientBin/CarList.xap 

Filtering the last record of the Silverlight application XAP file is added to the Main.xap file, as described here,

http://codeblog.larsholm.net/2010/02/avoid-incorrect-caching-of-silverlight-xap-file/

BUT the error above applies to the Car.CarList module, which is located in another XAP file.

The problem is that PRISM forces the second โ€œmoduleโ€ to load CarList.xap, so I'm not sure how to add the required query string.

+4
source share
1 answer

OK, it definitely decided.

Downloading my module directory looked like this:

 protected override IModuleCatalog GetModuleCatalog() { var CarListModule = new ModuleInfo() { ModuleName = "CarList", ModuleType = "Car.CarList.InitModule, Car.CarList, Version=1.0.0.0", Ref = "CarList.xap", InitializationMode = InitializationMode.OnDemand, }; // blah } 

I changed it to this,

 protected override IModuleCatalog GetModuleCatalog() { var CarListModule = new ModuleInfo() { ModuleName = "CarList", ModuleType = "Car.CarList.InitModule, Car.CarList, Version=1.0.0.0", Ref = "CarList.xap?Version=1.0.0.0", InitializationMode = InitializationMode.OnDemand, }; // blah } 

The query string will be different for each version, thereby forcing it to download the XAP file and not use the cached version.

Our build server finds the text version 1.0.0.0 above and replaces the real version numbers. This includes the version number in the text ModuleType. To match the build server, the version number in the actual modules is also set.

+2
source

All Articles