У меня возникли проблемы с перезапуском пула приложений из-за удаления папки, поэтому я решил попробовать отключить fcnMode (описано здесь: Перезапуск приложения для папки, удаленной,добавленной,обновленной).
Я попытался с реестром и установил для него значение 1. Веб-приложение будет запускаться больше ... Я также попробовал 2, где веб-сайт запустился, но проблема с удалением папки осталась. 2 не отключает FCN, так что я думаю, это было ожидаемо.
Затем я попытался использовать новое значение fcnMode .NET 4.5 в web.config:
Это имело тот же эффект, что и установка ключа реестра на 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
<Secret.NameSpace>.OieApplication.Application_Start +289
говорит нам, что это в вашем коде, но не где. - person Lilith River   schedule 07.03.2015customErrors
в Web.config? - person Lilith River   schedule 09.03.2015