Westwind.Globalization
Index was outside the bounds of the array at DbSimpleResourceProvider
Gravatar is a globally recognized avatar based on your email address. Index was outside the bounds of the array at DbSimpleResourceProvider
  preetham
  All
  Mar 4, 2019 @ 04:38am

Hi All,

I am getting the below error intermittently: Index was outside the bounds of the array. Index was outside the bounds of the array.

 at Westwind.Globalization.DbSimpleResourceProvider..ctor(String virtualPath, String className)
   at Westwind.Globalization.DbSimpleResourceProviderFactory.CreateGlobalResourceProvider(String classname)
   at System.Web.Compilation.ResourceExpressionBuilder.GetGlobalResourceProvider(String classKey)
   at AppPortal.MVC.Views.BaseView`1.GetLocalizedString(String key, String resourceSet)

This error occurred at the below line of code:

 public DbSimpleResourceProvider(string virtualPath, string className)
        {            
            if (!ProviderLoaded)
                ProviderLoaded = true;

            _ResourceSetName = className;
            DbResourceConfiguration.LoadedProviders.Add(this);

Could you please suggest what could be the problem and the possible solution for the same?

In case if I have to upgrade my Westwind.Globalization.dll, please suggest.

Thtanks, Preetham

Gravatar is a globally recognized avatar based on your email address. re: Index was outside the bounds of the array at DbSimpleResourceProvider
  Rick Strahl
  preetham
  Mar 4, 2019 @ 09:11pm

Not sure...

What are the conditions when this fails? Very busy? App just starting? Does repeat reliably?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Index was outside the bounds of the array at DbSimpleResourceProvider
  preetham
  Rick Strahl
  Mar 6, 2019 @ 05:32am

Thanks for quick turnaround Rick,

Below is my customer reply: This is a completely random issue... For the most part, there has been no pattern or specific condition which was noted. It happens randomly for each customer. The customer may go a week or two, and then see the issue on back to back days... I say "for the most part", as one customer recently saw the issue twice, and both times, the issue started occurring about 1 minute after they performed an iisreset (so in these two cases the App was just starting)... This may indicate that the issue is in some way related to the application pool recycling (either manually, or automatically); however, I could not reproduce the issue after many iisresets.

To give little background, when this specific error occurs, entire site will go down and we have to perform iisreset to get the site up.

I really appreciate your feedback/suggestion Rick, Thanks in advance.

Below is the event viewer log:

Gravatar is a globally recognized avatar based on your email address. re: Index was outside the bounds of the array at DbSimpleResourceProvider
  Rick Strahl
  preetham
  Mar 7, 2019 @ 09:09pm

Well, this sounds like a startup race condition - multiple threads under load accessing the same component. Is this a recent version you're running or an older version? I'm pretty sure that recent versions properly lock update operations, but I have to check.

+++ Rick ---

© 1996-2019