473,320 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 FileNotFoundException.
It's weird.

Here is my functio to load the settings:
<code>
public PageSettings LoadBuildSnLabelPageSettings()
{
PageSettings pageSettings = null;
try
{
IsolatedStorageFile f = IsolatedStorageFile.GetStore(
IsolatedStorageScope.User |
IsolatedStorageScope.Assembly, null, null);

if
(f.GetFileNames(IsolatedStorageFileNames.BuildSnLa belPageSettings).Length >
0)
{
using (IsolatedStorageFileStream fs =
new
IsolatedStorageFileStream(IsolatedStorageFileNames .BuildSnLabelPageSettings,
FileMode.Open))
{
if (fs.CanRead)
{
BinaryFormatter formatter = new BinaryFormatter();
pageSettings = (PageSettings)formatter.Deserialize(fs);
}
}
}
}
catch (Exception e)
{
_logService.Log(LogType.Error, e.ToString());
}
return pageSettings;
}
</code>
'IsolatedStorageFileNames.BuildSnLabelPageSettings ' 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; "BuildSnLabelPageSettings.xml"

The exception is thrown on the line:
"using (IsolatedStorageFileStream fs = new
IsolatedStorageFileStream(IsolatedStorageFileNames .BuildSnLabelPageSettings,
FileMode.Open))"

The exception text:
e = {"Could not find file
'BuildSnLabelPageSettings.xml'.":"BuildSnLabelPage Settings.xml"}

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:
"' BuildSnLabelPageSettings.xml'.":"BuildSnLabelPageS ettings.xml "

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 1074

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

Similar topics

1
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...
117
by: Peter Olcott | last post by:
www.halting-problem.com
28
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();...
0
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...
6
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...
16
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...
2
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...
1
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.