我们正在使用 MS Commerce Server Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider
,有时在重新启动应用程序后首次初始化时,我们会收到此错误:
System.Configuration.ConfigurationErrorsException - System.Web, Object reference not set to an instance of an object. (C:\Inetpub\web.config line 425)
at System.Web.Security.Membership.Initialize()
at System.Web.Security.Membership.get_Provider()
...
第 425 行是会员提供者规范:
<membership defaultProvider="UpmMembershipProvider">
<providers>
<clear />
<add name="UpmMembershipProvider"
applicationName="app"
enablePasswordRetrieval="false"
enablePasswordReset="true"
logonNameProperty="GeneralInfo.logon_name"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true"
enableCreateDate="true"
enableEmailAddress="true"
enableLastLoginDate="true"
profileDefinition="UserObject"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="1"
type="Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider" />
</providers>
</membership>
我们进行了内存转储,这就是我们得到的:
0:025> !dumpstack
OS Thread Id: 0x1080 (25)
Current frame: kernel32!RaiseException+0x53
ChildEBP RetAddr Caller,Callee
1213e5d8 7d4e237e kernel32!RaiseException+0x53, calling ntdll!RtlRaiseException
1213e5ec 79e8002c mscorwks!Binder::RawGetClass+0x20, calling mscorwks!Module::LookupTypeDef
1213e5fc 79e8068f mscorwks!Binder::IsClass+0x23, calling mscorwks!Binder::RawGetClass
1213e608 79ef2a0f mscorwks!Binder::IsException+0x14, calling mscorwks!Binder::IsClass
1213e618 79ef2a36 mscorwks!IsExceptionOfType+0x23, calling mscorwks!Binder::IsException
1213e620 79ef2bbc mscorwks!RaiseTheExceptionInternalOnly+0x2a8, calling kernel32!RaiseException
1213e668 79e81e3d mscorwks!SetObjectReferenceUnchecked+0x19
1213e680 79fccf80 mscorwks!JIT_Throw+0xfc, calling mscorwks!RaiseTheExceptionInternalOnly
1213e6b8 79295aea (MethodDesc 0x791aad5c +0xa System.Collections.CompatibleComparer.Equals(System.Object, System.Object)), calling (MethodDesc 0x791aad50 +0 System.Collections.CompatibleComparer.Compare(System.Object, System.Object))
1213e6d4 792e5fcd (MethodDesc 0x7910c3d0 +0xcd System.Collections.Hashtable.get_Item(System.Object))
1213e6f4 79fcced5 mscorwks!JIT_Throw+0x1e, calling mscorwks!LazyMachStateCaptureState
1213e70c 792861dc (MethodDesc 0x791a5f58 +0x1c System.RuntimeType.IsPrimitiveImpl()), calling mscorwks!TypeHandle::GetSignatureCorElementType
1213e724 7a57b600 (MethodDesc 0x7a4abadc +0x70 System.Configuration.SettingsBase.GetPropertyValueByName(System.String)), calling (MethodDesc 0x7a4ac288 +0 System.Configuration.SettingsPropertyValue.get_PropertyValue())
1213e744 66918ad7 (MethodDesc 0x65f9871c System.Web.Security.Membership.Initialize()), calling mscorwks!JIT_Throw
1213e7a0 6673ecb9 (MethodDesc 0x65f985a0 +0x5 System.Web.Security.Membership.get_Provider()), calling (MethodDesc 0x65f9871c +0 System.Web.Security.Membership.Initialize())
...
以前有人遇到过这样的事情吗?每次应用程序重新启动时都不会发生这种情况,而且它似乎不在一台特定的服务器上(站点在负载均衡器后面的多台服务器上运行)