问题描述
当我尝试访问System.Configuration.ConfigurationManager.AppSettings.Get(Key)时,我从函数GetHashCodeOfString引发了堆栈溢出异常.堆栈让我觉得它正在尝试设置哈希并对其进行排序,这是在哪里 发生异常.仅当我在Web应用程序上运行多个选项卡(同时都调用此选项卡)时,才会发生此异常.
在调用appsettings.get
之后,总体堆栈跟踪基本上如下.NameValueCollection.Get
NameObjectCOllectionBase.FindEntry
Hashtable.this.get
HashTable.InitHash
CultureAwareComparer.GetHashCode
CompareInfo.GetHashCodeOfString
管理到本地过渡
I am getting a stack overflow exception thrown from the function GetHashCodeOfString when I attempt to access System.Configuration.ConfigurationManager.AppSettings.Get(Key). The stack makes me think that it is trying to setup and sort a hash, which is where the exception is occuring. This exception only occurs when I am running multiple tabs on my web application, which are both calling this simultaneously.
The overall stack trace basically is as follows, after the call to appsettings.get
NameValueCollection.Get
NameObjectCOllectionBase.FindEntry
Hashtable.this.get
HashTable.InitHash
CultureAwareComparer.GetHashCode
CompareInfo.GetHashCodeOfString
managed to native transition
这篇关于来自字符串的getHashCode函数的堆栈溢出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!