473,659 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IsolatedStorage problem

I'm pretty new to Isolated Storage and have run across a problem.

I'm serializing a PageSettings object and storing using Isolated Storage.

When trying to load the PageSettings I'm getting a FileNotFoundExc eption.
It's weird.

Here is my functio to load the settings:
<code>
public PageSettings LoadBuildSnLabe lPageSettings()
{
PageSettings pageSettings = null;
try
{
IsolatedStorage File f = IsolatedStorage File.GetStore(
IsolatedStorage Scope.User |
IsolatedStorage Scope.Assembly, null, null);

if
(f.GetFileNames (IsolatedStorag eFileNames.Buil dSnLabelPageSet tings).Length >
0)
{
using (IsolatedStorag eFileStream fs =
new
IsolatedStorage FileStream(Isol atedStorageFile Names.BuildSnLa belPageSettings ,
FileMode.Open))
{
if (fs.CanRead)
{
BinaryFormatter formatter = new BinaryFormatter ();
pageSettings = (PageSettings)f ormatter.Deseri alize(fs);
}
}
}
}
catch (Exception e)
{
_logService.Log (LogType.Error, e.ToString());
}
return pageSettings;
}
</code>
'IsolatedStorag eFileNames.Buil dSnLabelPageSet tings' is a "constants class"
of mine that has the name of different files I store in Isolated Storage.
The file in this example is called; "BuildSnLabelPa geSettings.xml"

The exception is thrown on the line:
"using (IsolatedStorag eFileStream fs = new
IsolatedStorage FileStream(Isol atedStorageFile Names.BuildSnLa belPageSettings ,
FileMode.Open)) "

The exception text:
e = {"Could not find file
'BuildSnLabelPa geSettings.xml' .":"BuildSnLabe lPageSettings.x ml"}

Now I'm confused by this message. Is it just formatting the message strange
or is it reporting that the missing file's name is:
"' BuildSnLabelPag eSettings.xml'. ":"BuildSnLabel PageSettings.xm l "

I don't know where it's getting that filename from.

Anyways, hopefully someone here has experienced a similar problem and might
know how to solve it.

Thanks for reading,
Steve Klett
Aug 8 '06 #1
0 1090

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2311
by: Simon Chester | last post by:
Hello! Can anyone help me with this problem?... I have developed an ASP.NET (version 1.1) application which I have deployed to a number of webservers. The web application works fine on Windows 2000 Server computers. It also works OK on Windows 2003 Server UNTIL Windows 2003 Service Pack 1 is installed! The error and stack trace I am given is:
117
7175
by: Peter Olcott | last post by:
www.halting-problem.com
28
5203
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass(); .... and then call the virtual method, why is it that the base class's method is called instead of the overridden method? How do I fix this if I don't know at runtime what the child class is? I'm using Activator.CreateInstance() to load the...
0
1086
by: Zdenek Drlik | last post by:
Hi, I have an ASP.NET application. I want to use IsolatedStorage in this application. When I run this application with anonymous access set in IIS (user set to IUSR_<machine>) and impersonation set to false in web.config, IsolatedStorage works fine. But when I try to set impersonation to true via the web.config, calling IsolatedStorageFile.GetUserStoreForDomain() get me an IsolatedStorageException with this call stack:
6
3800
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length is more that 1249 bytes, then the progress bar of the browser will move too slow and then displaying that the page not found!!!! If the message is less than or equal to 1249 then no problem.
16
4902
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be easily verified: Implement the following in a web service method (just raises a SOAPException with a...
2
2536
by: Josh Kandiko | last post by:
Hi, I've been having some frustrations with deleting files from the Isolated Storage directories. Basically, I want my application to remove all instances of configuration information for my application when the application is uninstalled. So, I created an uninstaller class that overrides the uninstall method, as follows: private void DeleteSettings(){ // Try and delete the settings.config
1
385
by: Mythran | last post by:
We are using the P&P Enterprise Library Application Blocks in our applications and I'm reviewing how the EL stores it's cached data. As I was looking through the implementation of the security cache, I came across a class that was using the System.IO.IsolatedStorageFile class. I decided to look it up to understand it more and the MSDN docs fall short of explaining what it's used for. A quick glance at google came up with nothing I could...
1
1781
by: SteveM | last post by:
I am writing a ToolUsage tracker which we will be accessing from each of our custom written tools. It will basically capture various pieces of information about the user, and the application they are using, and then either store it directly in a database we have designated for this purpose or if they are using the tool off-line and off-network, it will store the data in a IsolatedStorage file, and then when the user is connected to the...
0
8339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8535
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.