Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Exception from DbSimpleResourceProvider

$
0
0
Re: Exception from DbSimpleResourceProvider
West Wind Web Toolkit for ASP.NET
Re: Exception from DbSimpleResourceProvider
04/18/2012
01:31:55 PM
3HD0T09ET Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None
Stephen,

Hmmm... I just double checked the code and this should have been addressed quite a while ago. But now that I'm checking I'm seeing that the initialization code actually isn't properly blocked into a lock() section (it was commented out). I've just added it back in.

You can grab the latest from the SVN repository here:

dbSimpleResourceProvider.cs


+++ Rick ---



Hi Jackie,

Did you ever find out what was the cause of this issue? We have started to see the same issue intermittently.

Thanks

Stephen


Hi Rick,

When we using the WestWind Web Toolkit in our web site for localization, we get the below exception intermittently:

String Message = "An error ocurred whilst trying to load your content, Index was outside the bounds of the array.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.List`1.Add(T item)
at Westwind.Globalization.DbSimpleResourceProvider..ctor(String virtualPath, String className)
at Westwind.Globalization.DbSimpleResourceProviderFactory.CreateLocalResourceProvider(String virtualPath)
at System.Web.Compilation.ResourceExpressionBuilder.GetLocalResourceProvider(VirtualPath virtualPath)
at System.Web.UI.TemplateControl.GetLocalResourceObject(String resourceKey)
..................................................................................

The exception is from below code:

public DbSimpleResourceProvider(string virtualPath, string className) { if (!ProviderLoaded) ProviderLoaded = true; _ResourceSetName = className; DbResourceConfiguration.LoadedProviders.Add(this); }

I think it may be a concurrency issue, do you think the LoadedProviders list should be locked when adding new providers to it?

Thanks,
Jackie




Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii


Viewing all articles
Browse latest Browse all 10393

Trending Articles