本帖最后由 无__畏 于 2013-6-9 20:44 编辑
研究生命周期的吧?这个不用重点关心,你要娶研究ECB的话,那你就跑远了! 它只是定义了个类型叫ecb- [SecurityPermission(SecurityAction.LinkDemand, Unrestricted=true)]
- public int ProcessRequest(IntPtr ecb, int iWRType)
- {
- IntPtr zero = IntPtr.Zero;
- if (iWRType == 2)
- {
- zero = ecb;
- ecb = UnsafeNativeMethods.GetEcb(zero);
- }
- ISAPIWorkerRequest wr = null;
- try
- {
- bool useOOP = iWRType == 1;
- wr = ISAPIWorkerRequest.CreateWorkerRequest(ecb, useOOP);
- wr.Initialize();
- string appPathTranslated = wr.GetAppPathTranslated();
- string appDomainAppPathInternal = HttpRuntime.AppDomainAppPathInternal;
- if ((appDomainAppPathInternal == null) || StringUtil.EqualsIgnoreCase(appPathTranslated, appDomainAppPathInternal))
- {
- HttpRuntime.ProcessRequestNoDemand(wr);
- return 0;
- }
- HttpRuntime.ShutdownAppDomain(ApplicationShutdownReason.PhysicalApplicationPathChanged, SR.GetString("Hosting_Phys_Path_Changed", new object[] { appDomainAppPathInternal, appPathTranslated }));
- return 1;
- }
- catch (Exception exception)
- {
- try
- {
- WebBaseEvent.RaiseRuntimeError(exception, this);
- }
- catch
- {
- }
- if ((wr == null) || !(wr.Ecb == IntPtr.Zero))
- {
- throw;
- }
- if (zero != IntPtr.Zero)
- {
- UnsafeNativeMethods.SetDoneWithSessionCalled(zero);
- }
- if (exception is ThreadAbortException)
- {
- Thread.ResetAbort();
- }
- return 0;
- }
- }
-
复制代码 |