.net 当fcnMode设置为禁用时,Web无法启动

.net 当fcnMode设置为禁用时,Web无法启动,.net,restart,iis-8.5,.net,Restart,Iis 8.5,由于文件夹删除,我在重新启动应用程序池时遇到一些问题,所以我想我应该尝试禁用fcnMode(此处描述:) 我尝试使用注册表,并将其设置为1。web应用程序将不再启动。。。我也尝试了2,在那里网站启动了,但文件夹删除问题仍然存在。2没有禁用FCN,所以我想这是意料之中的 然后我尝试在web.config中使用.NET 4.5新fcnMode值: 这与将注册表项设置为1的效果完全相同 在这里你可以看到我的问题 Server Error in '/' Application. Object ref

由于文件夹删除,我在重新启动应用程序池时遇到一些问题,所以我想我应该尝试禁用fcnMode(此处描述:)

我尝试使用注册表,并将其设置为1。web应用程序将不再启动。。。我也尝试了2,在那里网站启动了,但文件夹删除问题仍然存在。2没有禁用FCN,所以我想这是意料之中的

然后我尝试在web.config中使用.NET 4.5新fcnMode值:

这与将注册表项设置为1的效果完全相同

在这里你可以看到我的问题

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
“/”应用程序中出现服务器错误。 对象引用未设置为对象的实例。 描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源。 异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例。 源错误: 在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别。 堆栈跟踪: [NullReferenceException:对象引用未设置为对象的实例。] System.Object.GetType()+0 .OieApplication.Application_Start(对象发送方,事件参数)+289 [HttpException(0x80004005):对象引用未设置为对象的实例。] System.Web.HttpApplicationFactory.confureStartCalledForIntegratedMode(HttpContext上下文,httpapplicationapp)+12600317 System.Web.HttpApplication.registereventsubscriptionswithis(IntPtr-appContext,HttpContext-context,MethodInfo[]handlers)+175 System.Web.HttpApplication.InitSpecial(HttpApplicationState,MethodInfo[]处理程序,IntPtr-appContext,HttpContext-context)+304 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr-appContext,HttpContext-context)+404 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)+475 [HttpException(0x80004005):对象引用未设置为对象的实例。] System.Web.HttpRuntime.FirstRequestInit(HttpContext上下文)+12617364 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext上下文)+159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequestWR,HttpContext上下文)+12456981 版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.0.30319.34212
如果我浪费了别人的时间,我很抱歉,但突然之间,它工作得很好。我意识到我没有在调试模式下运行,这就是为什么我没有看到更好的堆栈跟踪

最合乎逻辑的假设一定是人(好吧,我)的因素。可能是放了两个httpRuntimes什么的


所以-没有错误了。但未解决原始问题,如下所述:

是否可以启用调试以获得更好的堆栈跟踪
.OieApplication.Application\u Start+289
告诉我们它在代码中,但不在哪里。我已经在调试模式下运行它了。该错误甚至不会在Visual Studio中触发错误-它只是使IIS Express崩溃。我猜+289不是行号,而是一些调试信息?Web.config中的
customErrors
设置为什么?您还有retail=false,并且Visual Studio正在生成带有相关.pdb文件的调试模式程序集?奇怪。你能创建一个复制项目吗?