问题描述
HttpApplicationstate=null;lock(this._freeList){if(this._numFreeAppInstances>0){state=(HttpApplication)this._freeList.Pop();this._numFreeAppInstances--;if(this._numFreeAppInstances<this._minFreeAppInstances){this._minFreeAppInstances=this._numFreeAppInstances;}}}if(state==null){state=(HttpApplication)HttpRuntime.CreateNonPublicInstance(this._theApplicationType);using(newApplicationImpersonationContext()){state.InitInternal(context,this._state,this._eventHandlerMethods);}}如图通过reflector我们可以看到红色部分InitInternal()这个方法会在新建application后被调用,如果从对象池直接拿到对象就不会执行这个方法了吗?如果不执行,那么又怎么加载web.config配置文件中注册的方法?求大神指点
解决方案
时间: 2024-10-27 20:41:25