Silverlight XAP files deleted with temporary internet files - silverlight

This question is almost a reverse of those questions wanting to force the refresh of XAP files.
We have an application that uses Silverlight 4. There is a policy in place though that deletes temporary internet files every time users close IE. Unfortunately all the xap files are deleted too and need to be downloaded next time a user opens Internet Explorer to access the application again.
At the slower sites the download of these 20 MB of files can take some time.
Is it possible to have XAP files downloaded / stored elsewhere on the user's computer rather than the temporary internet files directory?
Can this be programmed into the Silverlight Application or is it an Internet Explorer issue.
What we really need to do is minimise the download restraints without compromising the clean-up of the temporary internet files directory.
Thank you in advance

Out of Browser is certainly the way to go.
The XAP files are handled independently from the browser, and you can even push the installation out with a script.

Related

Treesize not scanning Onedrive local files

Treesize free (https://www.jam-software.com/treesize_free) is a file / folder analysis tool that quickly scans a PC and sorts folders and files in order of size to quickly show what is using up disk space.
It used to work just fine but sometime in the last few months (I've got a new PC so might be just since having this) I've noticed it has stopped working for OneDrive folders. We use OneDrive for business at work and all my docs / downloads / desktop etc are backed up on OneDrive, and these folders are all marked to keep offline ("Always keep on this device"), so they are saved locally.
However, Treesize doesn't show these files, apparently I only have 4GB in OneDrive.
If I right click the OneDrive folder and go to properties, I can see that it is about 60GB.
Any ideas what's going wrong, or how I could analyse disk space that is used by OneDrive?
I have the latest version of Treesize and have also tried an older version
I've tried starting Treesize as admin and as standard
Weird but just if I select an individual folder within Onedrive, it will scan fine. Just not the whole thing. So then I tried scanning the full C drive and then go to the Onedrive folder and "Update this branch" and it finished scanning it just fine:
and updates correctly after that:
Bit annoying though. Doesn't explain why it's doing this in the first place

How to populate Isolated Storage for Windows Phone application

Is there a recommended way to initialize the data in Isolated Storage for Windows Phone 7 application before it is run for the first time? Right now the best solution I can think of is putting a flag in IsolatedStorageSettings and checking for its presence on in the application Launching event. If the flag is not present I initialize several objects in code and save them to Isolated Storage and set the flag so they are not set the next time the application is run. Is there a better way to do this? Should I add the objects in serialized state as some kind of resource or it is acceptable to initialize them in code? I expect that they would require like a thousand lines of code.
Well if you can create your files and add them to the project. And if you are sure that you will not be editing your files than just keep them like that. The files will go into your installation folder.
Or if you think that you are going to edit them and want to keep the changes saved, than copy them from the installation folder to the application storage folder.
Here is a link in which a database which was added as a reference to the project is copied from installation folder to storage folder of the app.
http://msdn.microsoft.com/en-us/library/hh286411(v=vs.92).aspx
Do the same for your files and everything will be fine.
The second part of your question. Well after this just check for one file/folder in the app storage folder and if it says yes it is there than do not copy your files from installation folder to application storage folder.
And if you are trying to make the files when the application launches than just add a check before the creation code is run. Where you will search for a file/folder existence. And if it exists do not run the file creation code.

Reading Properties of all Files existing in one of the folders on Application Server and print on a JSP

I have to read the Name and Creation Date/Last Modified Date of all the files that may exist on /product/xyz folder, existing on JBoss Application Server and print the same on JSP.
This folder is being loaded with the fresh files when server is booted. The framework used is Struts 1.2.
Any hints or examples around how to read these information and print on JSP? Thanks!
EDIT :
I understand that it is much easy to read the files from a folder which might be part of my workspace folder. But, this is a different scenario.
Here, the JSP file will be deployed on JBoss application server, in some ABC folder, as part of some EARs. On the same application server, there is some other XYZ location, which will be loaded with the fresh files, when server is booted. I want to read the files existing in that XYZ folder. I Hope the scenario is more clear now.
The code doesn't change whether I try to access the files from my Work Space folders (Rather, which are to be part of EARs) or I may access from the Server File System (Outside the EARs).
The issue could be there in Path Mentioned or the Permission (Read/Write) to the Folder from which the files are being read.

Silverlight deployment to browser

I have an application for a huge business, which needs many pages, controls etc. The .xap file easily goes up to 50MB. I notice that every time when I load the page, the .xap file got downloaded to my local. However, my users may use 3G network to connect, so it must be very slow if we downlaod the app everytime they open the page. So I was wondering if there is some way I can do the deployment similar to WPF, which only download to local when the version is changed....
Any other suggestion to improve the loading speed is welcomed.
Thanks a lot
First and for most get your web server caching headers sorted. Typically you open the ClientBin folder in IIS Manager and enter the HTTP Response Header section. Set expiry to something like 1 Day (or if you update during normal working hours set to 15 Minutes). Note just because the content expires doesn't mean it will be re-downloaded but it does mean it'll get cached before being used. The browser will inform the server of the version it currently has if it has expired allow the server to simply respond with "go ahead and use that it hasn't changed since the last time you checked".
For such a large system you should seriously consider dividing the app up into multiple dll projects. Then use the Application Library Caching feature found in the main apps project properties. You need to create the appropriate .extmap.xml files for each of your dlls. Many of the SDK and Toolkit dlls have them already. This results in separate .zip files for these dlls being placed in the ClientBin folder and not incorporated into one large Xap. This allows you separate slow moving / never changing code into a set of zips and more frequently changing business code into another set. When you update the app the you only update the changed zips thus reducing the download burden of a new version. (Note this only works with inbrowser based apps).
In the serverlight project option, check the Reduce XAP size by using application library caching.

Reduce XAP Size Setting - What's the Benefit?

Using Silverlight 3, I noticed that System.Xml.Linq.dll was added to my XAP file, increasing the size from 12 to 58 k, so I checked the box 'Reduce XAP Size by using application library caching'.
Publishing the app to IIS, then loading it with Web Dev Helper enabled, I see that when I open the app, the XAP file at 12k is loaded, then the System.Xml.Linq.zip is loaded at 46k, for a total of 58k. Whenever I refresh the main page of the app, the same files are loaded into the browser. If I uncheck the 'Reduce..." box, then re-publish the app to IIS, one XAP file at 58k is loaded whenever I load the application.
How is one method different from or better than the other? I could see the advantage if the dll were somehow saved on the client computer removing the need to download it each time the app were opened.
Thanks
Mike Thomas
A browser caches by URL, so by splitting your application into a part which changes frequently and a part which will probably stay the same for a long time (the Linq part) and which might be shared between applications even, you save some download.
But it depends on the exact situation (frequency of change, location of 'generic' DLLs, etc.) whether it really helps.
The whole reason for keeping XAP size small is so that your application loads as quickly as possible. This is important: even on a faster connection, a bloated XAP can take extra seconds to load, which can be long enough for your users to leave your site.
While Linq is only accounting for 46KB, there are other cases where this can make a bigger deal. For instance, the SyndicationFeed class makes it really easy to handle RSS and ATOM feeds, but it weighs in at 114KB.
Application library caching helps in two ways:
It allows for sharing common DLL's between applications, so if another application has already pulled down a system DLL, your app can just reference it.
It allows your application updates to be smaller, since the framework DLL's won't change betwen XAP versions.
The difference is that when dll's are outside of the XAP file even though browser asks for those files webserver responds with 304 Not Modified HTTP response.
By default browser will not request for those files to be downloaded again. This obviously saves time especially when project references "heavy" libraries (ie. Telerik ones can be quite large in size)
Hope this helps someone.

Resources