Isolated Storage bug at design time  
Author Message
amfisher70





PostPosted: Tue Aug 03 18:41:35 CDT 2004 Top

Visual C#.Net >> Isolated Storage bug at design time Hello,

We use several user controls and derived custom controls. Some of
which actually hit the database at design time to show data (such as
filling a list box, etc...)

Our c# client server app uses the .NET Isolated storage libraries for
storing connection string and other info about the application. The
problem is that the Isolated storage bombs at design time (when you
try and view a control that hits the database at design time).

The workaround we have in place is the Isolated storage check is in a
try / catch. If it fails, we load a hard-coded xml file with the same
settings at a specified path that never changes... which defeats the
whole purpose of Isolated Storage.

This isn't a huge issue cuz it only happens at design time and we have
a (hackish) workaround, but I was wondering if anyone has had this
problem and/or knows why it would be happening?

Thanks,
Dave

DotNet398  
 
 
Justin





PostPosted: Tue Aug 03 18:41:35 CDT 2004 Top

Visual C#.Net >> Isolated Storage bug at design time IsolatedStorage is based around evidence and it is possible that the
IsolatedStorageScope you are using isn't getting the appropriate
evidence in order to find your path.

If you are basing anything off of AppDomain or Application evidence
then there is a big chance of error when running in a design-time
environment.

Rather than finding fault in the isolated storage API try to examine why
you need to store credentials at design-time. You can make use of
design-time only properties or other features that were meant for this
operation instead.

--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers

"malcolm" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hello,
>
> We use several user controls and derived custom controls. Some of
> which actually hit the database at design time to show data (such as
> filling a list box, etc...)
>
> Our c# client server app uses the .NET Isolated storage libraries for
> storing connection string and other info about the application. The
> problem is that the Isolated storage bombs at design time (when you
> try and view a control that hits the database at design time).
>
> The workaround we have in place is the Isolated storage check is in a
> try / catch. If it fails, we load a hard-coded xml file with the same
> settings at a specified path that never changes... which defeats the
> whole purpose of Isolated Storage.
>
> This isn't a huge issue cuz it only happens at design time and we have
> a (hackish) workaround, but I was wondering if anyone has had this
> problem and/or knows why it would be happening?
>
> Thanks,
> Dave