最近,我们的开发服务器上出现了一些异常错误。我们正在使用Jenkins构建和部署使用OWIN的ASP.NET Web API,直到现在一切都运行正常。但是,最近我们开始间歇性地看到以下错误,从Windows事件日志中轻微编辑错误:
Exception information:
Exception type: EntryPointNotFoundException
Exception message: The following errors occurred while attempting to load the app.
- No assembly found containing an OwinStartupAttribute.
- The given type or method 'Api.Startup' was not found. Try specifying the Assembly.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.
at Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup()
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
回收IIS应用程序池通常可以解决问题,但它正在发生的事实是令人担忧的。关于可能导致这种情况发生的任何想法?