Web cannot start with fcnMode set to disabled

雨燕双飞 提交于 2019-12-25 07:57:51

问题


I'm having some trouble with app pool restarts due to folder deletion, so I thought I would try to disable fcnMode (Described here: Application Restart for folder deleted,added,updated).

I tried with the registry, and set it to 1. The web app would start anymore... I also tried 2, where the web started up but the folder deletion problem remained. 2 doesn't disable FCN so I guess it was expected.

Then I tried using .NET 4.5 new fcnMode value in web.config:

This had the exact same affect as setting the registry key to 1.

Here you can see the problem I've got.

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 


    [NullReferenceException: Object reference not set to an instance of an object.]
       System.Object.GetType() +0
       <Secret.NameSpace>.OieApplication.Application_Start(Object sender, EventArgs e) +289

    [HttpException (0x80004005): Object reference not set to an instance of an object.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12600317
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

    [HttpException (0x80004005): Object reference not set to an instance of an object.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12617364
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12456981

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212

回答1:


I'm sorry if I've wasted someones time, but suddenly it works just fine. I realized that I did not run in debug mode, that's why I didn't see a better stack trace.

The most logical assumption must have been the human (ok, me) factor. Probably put double httpRuntimes or something.

So - no error anymore. Did not solve to original problem though, described here: ImageResizer restarts application pool



来源:https://stackoverflow.com/questions/28912932/web-cannot-start-with-fcnmode-set-to-disabled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!