Quantcast
Channel: Troubleshooting
Viewing all articles
Browse latest Browse all 1814

ASP.Net raises error when switching language to Vietnamese

$
0
0

Environment: OS Windows 2008 R2 Sp1, IIS 7.5, Application Pool CLR .Net 4 x64.

Our production site is ASP.net web site (not web application), it supports 6 languages with UI Culture as follows: en-US, ja-JP, th-TH, zh-CN, zh-TW, ko-KR, and vi-VN. The site works perfectly with all languages except Vietnamese. Sometimes, when we change language to Vietnamese, some pages throw exception 

 System.InvalidOperationException: Collection was modified; enumeration operation may not execute. 
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark) 
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark) 
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) 
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) 
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) 
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) 
at Resources.Lang.get_noofticket() 

Looking at the error message, we understand that the error occured when Resource.Lange.get_nooticket() was called and method thrown the exception was System.Reflection.RuntimeAssembly _nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean).Resource.Lang is global resource file. 
We found nothing "special" about Vietnamese resource files except some keys missing in Vietnamese resource files. However, from what I know, it cannot be the problem, because ResourceManager can automatically switch to default culture (English) to get resource value. Moreover, it does not happen frequently, we don't know how to reproduce. 

We also have report from dump file as follows:

KERNELBASE!RaiseException+39 
MSVCR100_CLR0400!CxxThrowException+81 
clr!AssemblySpecBindingCache::AssemblyBinding::ThrowIfError+38 
clr! ?? ::FNODOBFM::`string'+6f100 
clr!AssemblySpec::LoadDomainAssembly+129 
clr!AssemblySpec::LoadAssembly+1b 
clr!AssemblyNative::Load+26a 
[[HelperMethodFrame_PROTECTOBJ] (System.Reflection.RuntimeAssembly._nLoad)] System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMarkByRef, Boolean, Boolean, Boolean) 
mscorlib_ni!System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(System.String, System.Globalization.CultureInfo, System.Version, Boolean, System.Threading.StackCrawlMark ByRef)+ee 
mscorlib_ni!System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo, System.Threading.StackCrawlMark ByRef)+d7 
mscorlib_ni!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceSet>, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)+e2 
mscorlib_ni!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)+268 
mscorlib_ni!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean)+23 
mscorlib_ni!System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)+13c 
Resources.Lang.get_noofticket()+5b 
Fanex.Age.UI.Reports.Winloss.WinlossDetailMaster_ExcelContents_Block.get_s32()+28 
Fanex.Age.UI.Reports.Winloss.WinlossDetailMaster_ExcelContents_Block.ToString(System.Text.StringBuilder ByRef)+3ce 
Fanex.Age.UI.Reports.Winloss.WinlossDetailMaster_Template.ToString(System.Text.StringBuilder ByRef)+40d 
Fanex.Age.UI.Reports.Winloss.WinlossDetailMaster_Page.RenderContent(System.Web.UI.HtmlTextWriter)+1fa 
Fanex.Age.UI.TplPage.Render(System.Web.UI.HtmlTextWriter)+293 
System_Web_ni!System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)+149a 
System_Web_ni!System.Web.UI.Page.ProcessRequest(Boolean, Boolean)+c1 
System_Web_ni!System.Web.UI.Page.ProcessRequest()+77 
System_Web_ni!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)+a7 
System_Web_ni!System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+255 
System_Web_ni!System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)+10a 
System_Web_ni!System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)+6d9 
System_Web_ni!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)+85 
System_Web_ni!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)+2c6 
System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+3bf 
System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+22 
System_Web_ni!DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)+51 
clr!UMThunkStubAMD64+77 
webengine4!W3_MGD_HANDLER::ProcessNotification+79 
webengine4!W3_MGD_HANDLER::DoWork+310 
webengine4!RequestDoWork+42d 
webengine4!CMgdEngHttpModule::OnExecuteRequestHandler+24 
iiscore!NOTIFICATION_CONTEXT::RequestDoWork+233 
iiscore!NOTIFICATION_CONTEXT::CallModulesInternal+174 
iiscore!NOTIFICATION_CONTEXT::CallModules+25 
iiscore!W3_CONTEXT::DoWork+34d 
iiscore!W3_CONTEXT::IndicateCompletion+8c 
webengine4!W3_MGD_HANDLER::IndicateCompletion+59 
webengine4!MgdIndicateCompletion+22 
clr!DoNDirectCall__PatchGetThreadCall+7b 
System_Web_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)+57 
[[NDirectMethodFrameStandalone] (System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion)] System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatusByRef) 
System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+4f4 
System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+22 
System_Web_ni!DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)+51 
clr!UM2MThunk_WrapperHelper+4b 
clr!UM2MThunk_Wrapper+90 
clr!Thread::DoADCallBack+127 
[[ContextTransitionFrame]] 
clr!UM2MDoADCallBack+9e 
clr!UMThunkStubAMD64+273 
webengine4!W3_MGD_HANDLER::ProcessNotification+79 
webengine4!ProcessNotificationCallback+43 
clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+181 
clr!ThreadpoolMgr::NewWorkerThreadStart+2e5 
clr!ThreadpoolMgr::WorkerThreadStart+3b 
clr!Thread::intermediateThreadProc+7d 
kernel32!BaseThreadInitThunk+d 
ntdll!RtlUserThreadStart+1d 

We did try to read source code of mscorlib but System.Reflection.RuntimeAssembly._nLoad led us to  a dead-end. Why the issue just occurs with Vietnamese language?  

I would greatly appreciate it if you kindly give me some clues to resolve this issue. 


Viewing all articles
Browse latest Browse all 1814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>