OWIN显示死亡的黄色屏幕
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OWIN显示死亡的黄色屏幕相关的知识,希望对你有一定的参考价值。
我们有一个旧的Web表单项目,我们想要添加OWIN。 Startup
类被添加到项目中。我们有assebmly属性和配置owin:appStartup
应用程序密钥。我们在项目中引用了Microsoft.Owin.Host.SystemWeb
版本4.0.0.0。每当OWIN想要发现它的StartUp类时,我们都会看到一个带有FormatException的黄色死亡屏幕(DateTime字符串的格式不正确)以下是异常的堆栈跟踪:
[FormatException: The string was not recognized as a valid DateTime. There is an unknown word starting at index 20.]
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +14272006
System.Windows.Forms.TypeLibraryTimeStampAttribute..ctor(String timestamp) +53
System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0
System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +48
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +787
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +144
Owin.Loader.DefaultLoader.SearchForStartupAttribute(String friendlyName, IList`1 errors, Boolean& conflict) +190
Owin.Loader.DefaultLoader.GetDefaultConfiguration(String friendlyName, IList`1 errors) +68
Owin.Loader.DefaultLoader.LoadImplementation(String startupName, IList`1 errorDetails) +89
Owin.Loader.DefaultLoader.Load(String startupName, IList`1 errorDetails) +30
Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup() +165
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +37
System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +135
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +160
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +580
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +165
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +267
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341
[HttpException (0x80004005): The string was not recognized as a valid DateTime. There is an unknown word starting at index 20.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688
我们有其他网络表单项目工作正常,我无法理解我们的项目有什么问题。
答案
基于你的堆栈跟踪,你的项目中某处必须有一个TypeLibraryTimeStampAttribute
,其输入无效,无法用DateTime
解析。
您的问题可能会通过删除TypeLibraryTimeStampAttribute
或将其输入更改为有效的问题来解决。
以上是关于OWIN显示死亡的黄色屏幕的主要内容,如果未能解决你的问题,请参考以下文章
在 ViewPager 内设计一个 HorizontalScrollView 或使用片段:
打开cdr软件,电脑屏幕中间立刻显示白色方框中间还有一个黄色感叹号,求解决