Caching Application Block - IsolatedStorage path too long

Topics: Caching Application Block
Feb 15, 2011 at 1:48 PM


 I am using the caching application block to cache some data on client machines so that they have access to the data, even when they are disconnected from the net. This has worked flawlessly for many machines, but on some XP machines, I'm getting the following error when trying to cache the first piece of data:

Message = The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

If I understand where the backing store is saved, it's in a path similar to this:

c:\Documents and Settings\<User Name>\Local Settings\Application Data\IsolatedStorage\tqli5mdv.xa5\htccao3l.ksb\StrongName.1r3fiexsbrusebdd0maaohl2i5cz4lhq\StrongName.mwjgo5cc1qomwe5tbepbfnyucq0obm3f\Files\<BackingStore PartitionName>

This is obviously a large path to begin with. Then throw in the user name and partition name and I'm guessing it exceeds the limit.

 So, I would like to change, if possible, the location of where the backing store is saved. I would like to leave everything else alone. How difficult is it to do this? How would I get started?

Feb 16, 2011 at 12:42 AM

I'm not sure if you can control the location when using the IsolatedStorage, I suggest you ask this over in the MSDN forum.  If this is possible, then what you would need to do is create a custom backing store.  Creating custom providers is documented in EntLib, you can find it here.  You can also check the source code for reference.


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.