Веб-сайт ASP.NET случайным образом вызывает эту System.Drawing-error:
System.Runtime.InteropServices.ExternalException: System.Drawing.Bitmap..ctor (потоковый поток)
System.Drawing.ToolboxBitmapAttribute..cctor ()
Exception information:
Exception type: TypeInitializationException
Exception message: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception.
Stack trace: at System.Reflection.CustomAttribute._CreateCaObject(Void* pModule, Void* pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.CreateCaObject(Module module, RuntimeMethodHandle ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes(Type type)
at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetAttributes()
at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes()
at System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType)
at System.Web.UI.ThemeableAttribute.IsTypeThemeable(Type type)
at System.Web.UI.Control.ApplySkin(Page page)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Почему? Я думаю, что это ошибка .NET Framework (на самом деле я не пытаюсь создавать изображения).
Я нашел временное решение : перезапустите IIS и удалите временные файлы ASP.NET ("% WINDIR% \ Microsoft.NET \ Framework \ v2.0.50727 \ Временные файлы ASP.NET").
Но когда эта ошибка происходит на рабочем веб-сервере, временного недостаточно ...