I get the error
Error 142 The "GenerateResource" task failed unexpectedly.
System.Runtime.InteropServices.ExternalException (0x80004005): Common error in GDI+.
bei System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
bei System.Drawing.Image.Save(MemoryStream stream)
bei System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
bei System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
bei System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
bei System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
bei System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
bei System.Resources.ResourceWriter.Generate()
bei System.Resources.ResourceWriter.Dispose(Boolean disposing)
bei System.Resources.ResourceWriter.Close()
bei Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, IResourceWriter writer)
bei Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, String filename)
bei Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFileOrDir)
bei Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
bei Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
bei Microsoft.Build.Tasks.GenerateResource.Execute()
bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() prjMyProject
I have spent 2 days with this error now, removing forms and classes from my project, and even all interop types. Nothing helped.
Does anybody have any idea how I could track this error?
I tried ProcMon, but I did not see anything that would help me (well, I don't know what to look for, that's what makes it even harder).
Do you have an embedded image on a form that might be corrupt?
Can you open all of your forms and user controls in the designer without getting an error?
See: Compiler Issue in Windows 7: A generic error occurred in GDI+.
The way I fixed it, was going though all the windows that had some embedded image, one by one. Then I found the "offender", the designer crashed while opening it.
I just had to delete the references to this image on the designer.cs and voila!
Related
<FxCopReport Version="10.0">
<Exceptions>
<Exception Keyword="CA0001" Kind="Engine">
<Type>Microsoft.FxCop.Sdk.InvalidMetadataException </Type>
<ExceptionMessage>
The following error was encountered while reading module 'myproject': Method type parameter in position 0 is not valid.
</ExceptionMessage>
<StackTrace>
at Microsoft.FxCop.Sdk.Reader.HandleError(ModuleNode mod, String errorMessage) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseTypeList(MemoryCursor sigReader) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseTypeList(MemoryCursor sigReader) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseParameterTypes(TypeNodeCollection& varArgTypes, MemoryCursor sigReader, Int32 paramCount, Boolean& genericParameterEncountered) at Microsoft.FxCop.Sdk.Reader.GetMemberFromRef(Int32 i, TypeNodeCollection& varArgTypes, Int32 numGenericArgs) at Microsoft.FxCop.Sdk.Reader.GetMethodDefOrRef(Int32 codedIndex, Int32 numberOfGenericArguments) at Microsoft.FxCop.Sdk.Reader.GetMethodFromSpec(Int32 i) at Microsoft.FxCop.Sdk.Reader.GetMemberFromToken(Int32 tok, TypeNodeCollection& varArgTypes) at Microsoft.FxCop.Sdk.InstructionParser.ParseInstruction() at Microsoft.FxCop.Sdk.InstructionParser.ParseInstructions() at Microsoft.FxCop.Sdk.Reader.ParseMethodInstructions(Method method, Int32 methodIndex, Int32 RVA) at Microsoft.FxCop.Sdk.Reader.GetMethodInstructions(Method method, Object i) at Microsoft.FxCop.Sdk.Reader.GetMethodBody(Method method, Object i, Boolean asInstructionList) at Microsoft.FxCop.Sdk.Method.get_Instructions() at Microsoft.FxCop.Sdk.RuleUtilities.HasImperativeSecurityAction(Method method, SecurityAction action) at Microsoft.FxCop.Sdk.RuleUtilities.HasSecurityAction(Method method, SecurityAction action) at Microsoft.FxCop.Sdk.RuleUtilities.HasSecurityAction(Method method, SecurityAction[] actions) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.RecordCallSites(Method caller) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitMember(Member member, TargetMember target) at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitMembers(MemberCollection members, TargetMemberDictionary targets, Boolean visitNestedTypes) at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitType(TypeNode type, TargetType target) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitType(TypeNode type, TargetType target) at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitTypes(TypeNodeCollection types, TargetNamespaceDictionary targets) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitModule(ModuleNode module, TargetModule target) at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.Load(TargetFile target, Boolean buildTree, Boolean queueItems, AssemblyNode loadedAssembly) at Microsoft.FxCop.Engines.Introspection.LoadVisitor.LoadAssemblies(Queue queue, ExceptionCollection exceptions)
</StackTrace>
</Exception>
<Exception Keyword="CA0001" Kind="Engine">
<Type>Microsoft.FxCop.Sdk.FxCopException </Type>
<ExceptionMessage>
An unhandled exception occurred while analyzing assemblies:
</ExceptionMessage>
<InnerType>Microsoft.FxCop.Sdk.InvalidMetadataException </InnerType>
<InnerExceptionMessage>
The following error was encountered while reading module 'myproject': Method type parameter in position 0 is not valid.
</InnerExceptionMessage>
<InnerStackTrace>
at Microsoft.FxCop.Sdk.Reader.HandleError(ModuleNode mod, String errorMessage) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseTypeList(MemoryCursor sigReader) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseTypeList(MemoryCursor sigReader) at Microsoft.FxCop.Sdk.Reader.ParseTypeSignature(MemoryCursor sigReader, Boolean& pinned, Boolean& isTypeArgument) at Microsoft.FxCop.Sdk.Reader.ParseParameterTypes(TypeNodeCollection& varArgTypes, MemoryCursor sigReader, Int32 paramCount, Boolean& genericParameterEncountered) at Microsoft.FxCop.Sdk.Reader.GetMemberFromRef(Int32 i, TypeNodeCollection& varArgTypes, Int32 numGenericArgs) at Microsoft.FxCop.Sdk.Reader.GetMethodDefOrRef(Int32 codedIndex, Int32 numberOfGenericArguments) at Microsoft.FxCop.Sdk.Reader.GetMethodFromSpec(Int32 i) at Microsoft.FxCop.Sdk.Reader.GetMemberFromToken(Int32 tok, TypeNodeCollection& varArgTypes) at Microsoft.FxCop.Sdk.InstructionParser.ParseInstruction() at Microsoft.FxCop.Sdk.InstructionParser.ParseInstructions() at Microsoft.FxCop.Sdk.Reader.ParseMethodInstructions(Method method, Int32 methodIndex, Int32 RVA) at Microsoft.FxCop.Sdk.Reader.GetMethodInstructions(Method method, Object i) at Microsoft.FxCop.Sdk.Reader.GetMethodBody(Method method, Object i, Boolean asInstructionList) at Microsoft.FxCop.Sdk.Method.get_Instructions() at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.UpdateSourceContext(SourceContext& sourceContext, Method method) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.LogProblems(Method method, TargetMember target, Rule rule, ProblemCollection problems) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.LogProblems(Member member, TargetMember target, Rule rule, ProblemCollection problems) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.CheckMember(Member memberToAnalyze, Member member, TargetMember target) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.VisitMember(Member member, TargetMember target) at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitMembers(MemberCollection members, TargetMemberDictionary targets, Boolean visitNestedTypes) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.VisitType(TypeNode type, TargetType target) at Microsoft.FxCop.Engines.Introspection.AnalysisVisitor.Analyze(Queue queue) at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.AnalyzeThread()
</InnerStackTrace>
</Exception>
</Exceptions>
</FxCopReport>
I got the following errors when running fxcop code analysis, anyone seen these before, i am not sure why it's telling "Method type parameter in position 0 is not valid"?
Are you using Code Contracts or PostSharp or some other post-compilation step that fiddles with the IL?
I've just started getting this - in my case, it went away when I changed the Code Contract's Runtime Checks from "Full" to "Pre and Post", so it looks like something dodgy in ccrewrite.exe.
ive been working on a screenshot program that upload the image automaticly to an FTP server. but i get an error when i try to use:
PictureBox1.Image.Save("C:\test.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
and i always get the Error:
A generic error occurred in the GDI+
ErrorCode: -2147467259
source- System.Drawing
Full ERROR CODE BELOW (vid = at in english):
System.Runtime.InteropServices.ExternalException was unhandled
ErrorCode=-2147467259
Message="Ett allmänt fel uppstod i GDI+."
Source="System.Drawing"
StackTrace:
vid System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
vid mostlyTesting.Form1.Timer1_Tick(Object sender, EventArgs e) i C:\Users\emil\AppData\Local\Temporary Projects\mostlyTesting\Form1.vb:rad 22
vid System.Windows.Forms.Timer.OnTick(EventArgs e)
vid System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
vid System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
vid System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
vid System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
vid System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
vid System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
vid Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
vid mostlyTesting.My.MyApplication.Main(String[] Args) i 17d14f5c-a337-4978-8281-53493378c1071.vb:rad 81
vid System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
vid Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
vid System.Threading.ThreadHelper.ThreadStart()
InnerException:
I think what you want is this here
Me.PictureBox1.Image.Save(IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.Desktop, "TestFile.bmp"))
I hope it helps you. Good luck!
Update:
After I saw Plutonix comment, I tried what he said and It's true, When I try to save the image on C:\ (root folder) It gave me the same error as its giving to you. When I tried with a different path, it worked! The only way is to Run as Administrator and It works for C:\
Error occurred in deployment step 'Activate Features': Could not find any recognizable digits.
Dos anyone know what this error message means? I'm trying to deploy a feature containing some, content types, list definitions and list instances.
Stack Trace:
[FormatException: Could not find any recognizable digits.]
Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) +23502762
Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) +138
Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce) +25284223
Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) +27336607
Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) +150
Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope) +83
Microsoft.SharePoint.WebControls.FeatureActivator.ActivateFeature(Guid featid, SPFeatureDefinitionScope featdefScope) +699
Microsoft.SharePoint.WebControls.FeatureActivatorItem.BtnActivateFeature_Click(Object objSender, EventArgs evtargs) +140
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
Full and answered thread can be found here at sharepoint.stackexchange.com
After upgrading from sharepoint 2007 to 2010, our "manage content and structure" feature has stopped working. The error says there is a field that is not properly installed in a list. It says I need to go into the list settings and delete that field. Problem is I have no clue which of the hundreds of lists is the issue. We have deleted many old lists that had problems. I have physically clicked on every list I could find to try to determine which list is causing the issue but have not been able to locate the problem child. Does anyone know how I might go about finding the problem list so we can get our "Manage Content and Structure" section working again?
Actual Error Text:
One or more field types are not installed properly. Go to the list settings page to delete these fields.
UPDATE:
06/22/2011 10:14:09.14 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://nova:80/_layouts/sitemanager.aspx?Source=%2F%5Flayouts%2Fviewlsts%2Easpx) a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.14 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.18 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation General xxpm High Unable to execute query: Error 0x81020014 a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.18 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation General 8kh7 High One or more field types are not installed properly. Go to the list settings page to delete these fields. a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.18 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation Runtime tkau Unexpected System.Runtime.InteropServices.COMException: One or more field types are not installed properly. Go to the list settings page to delete these fields. at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.18 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation General 90hv Unexpected Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace: at Microsoft.SharePoint.SPRegionalSettings.get_GlobalInstalledLanguages() at Microsoft.SharePoint.Utilities.ThemingLocations.GetThemableStylesFolders(SPSite site, Boolean includeFileSystem) at Microsoft.SharePoint.WebControls.CssRegistrationRecord.UpdateThemableReferences(SPSite site, IEnumerable`1 references) at Microsoft.SharePoint.WebControls.CssLink.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP._layouts_error_aspx.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) at System.Web.HttpServerUtility.Transfer(String path) at Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.ErrorHandler(HttpApplication app, Boolean errorIsOnErrorPage) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.ErrorAppHandler(Object oSender, EventArgs ea) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.HttpApplication.RaiseOnError() at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
06/22/2011 10:14:09.19 w3wp.exe (0x0ABC) 0x0308 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://nova:80/_layouts/sitemanager.aspx?Source=%2F%5Flayouts%2Fviewlsts%2Easpx)). Execution Time=51.3515051261099 a3b56f0a-13fc-4e2b-9ed0-3ce9c1ee4177
Check the log file in 12\LOGS hive.
I've got some RDL using it in a (windows forms) .net 2.0 app.
When user clicks around in app, rdl is reloaded into report viewer.
For the same RDL I sometimes get the error, sometimes not.
When I run my app debugging in Visual Studio it never gets the error.
Immediately after running, I launch the exe from the bin folder and now I get errors (but only 50% of the time the report gets refreshed)
The Exception occurs when I call ReportViewer.RefreshReport
I've looked through the RDL at every place where there is a minOccurs and they are all either "0" or "1".
Interestingly if I call Application.DoEvents() immediately before I call RefreshReport I can but the amount of time the error happens down to 5%... but it still occasionally happens!
The definition of the report 'Main Report' is invalid.
, An unexpected error occurred in Report Processing.
, The value for the 'minOccurs' attribute is invalid - The value for the 'minOccurs' attribute must be xsd:nonNegativeInteger..
(DefinitionInvalidException)
Stack Trace:
Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.Xml.Schema.XmlSchemaException: The value for the 'minOccurs' attribute is invalid - The value for the 'minOccurs' attribute must be xsd:nonNegativeInteger..
at System.Xml.Schema.XmlSchema.Read(XmlReader reader, ValidationEventHandler validationEventHandler)
at System.Xml.Schema.XmlSchema.Read(Stream stream, ValidationEventHandler validationEventHandler)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.RmlValidatingReader..ctor(XmlTextReader textReader, PublishingErrorContext errorContext, String targetRDLNamespace)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.RmlValidatingReader.CreateReader(XmlTextReader upgradedRDLReader, PublishingErrorContext errorContext, String targetRDLNamespace)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.Phase1(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, String& description, String& language, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions)
at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)
--- End of inner exception stack trace ---
at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)
at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport()
at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot()
at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot)
at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContext itemContext, Boolean rebuild, ReportSnapshotBase& snapshot)
at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild)
at Microsoft.Reporting.WinForms.LocalReport.CompileReport()
Instead of
ReportViewer.RefreshReport
Doing this seemed to fix it.
Application.DoEvents()
ReportViewer.LocalReport.ExecuteReportInCurrentAppDomain(Reflection.Assembly.GetExecutingAssembly().Evidence)