SharePoint 2019 - Stop Inheriting Permissions results in System.Web.HttpUnhandledException (0x80004005) error - sharepoint-2019

After finishing up the installation of SharePoint 2019, I wanted to create a new document library. As I didn't want the library to inherit permissions from the root site, I clicked "Stop Inheriting Permissions". Unexpectedly, this resulted in an "Exception from HRESULT: 0x80131904" error. The ULS logs show the following:
05/10/2022 14:38:01.48 w3wp.exe (0x25F4) 0x41F0 SharePoint Foundation General ajlz0 High Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: Exception from HRESULT: 0x80131904 ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80131904 at Microsoft.SharePoint.Library.SPRequestInternalClass.ResetSecurityScope(String bstrUrl, UInt32 dwObjectType, String bstrObjUrl, Guid guidDoc, Boolean bUnique, Boolean bCopyRoleAssignments, Boolean bClearSubScopes, Guid& pguidScopeId, Int32& piError, Boolean bDontCopyLimitedPerms, Boolean bDontCopyLimitedPermsV2) at Microsoft.SharePoint.Library.SPRequest.ResetSecurityScope(String bstrUrl, UInt32 dwObjectType, String bstrObjUrl, Guid guidDoc, Boolean bUnique, Boolean bCopyRoleAssignments, Boolean bClearSubScopes, Guid& pguidScopeId, Int32& piError, Boolean bDontCopyLimitedPerms, Boolean bDontCopyLimitedPermsV2) --- End of inner exception stack trace --- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.ResetSecurityScope(String bstrUrl, UInt32 dwObjectType, String bstrObjUrl, Guid guidDoc, Boolean bUnique, Boolean bCopyRoleAssignments, Boolean bClearSubScopes, Guid& pguidScopeId, Int32& piError, Boolean bDontCopyLimitedPerms, Boolean bDontCopyLimitedPermsV2) at Microsoft.SharePoint.SPSecurableObjectImpl.RevertRoleInheritance(Boolean copyRoleAssignments, Boolean clearSubScopes, Boolean dontCopyLimitedPerms, Boolean dontCopyLimitedPermsV2) at Microsoft.SharePoint.SPSecurableObjectImpl.BreakRoleInheritance(Boolean copyRoleAssignments, Boolean clearSubscopes, Boolean dontCopyLimitedPerms) at Microsoft.SharePoint.SPList.BreakRoleInheritance(Boolean copyRoleAssignments, Boolean clearSubscopes) at Microsoft.SharePoint.ApplicationPages.UserRoles.InitPage() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint... 6c023ca0-3adc-207d-eeb2-d87973e802f3
After some research, I thought it would be a database-related issue, so I checked the parametrization. It was set to simple for every database, like the forums told me to do, so that didn't help either.
I also installed SharePoint 2019 on another server, the problem exists there as well.
Does anyone have a clue on this?
Thanks in advance.

Related

An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'xxx' is invalid

I've a VB application which will use .rdl to generate reports in PDF format by using Microsoft.ReportViewer.WinForms.
There is an features which we allow the application to run without showing any UI to generate certain reports based on the setting in database. And we use task scheduler to run the application daily in the morning to generate some daily reports.
We have few client is using the same application with same rdl reports. But 1 of the client is keep getting the issue when task scheduler trigger the application while others is working fine.
The application will basically generate 11 reports everyday in the morning, but 1 of the report is keep throwing the exception whenever the task scheduler trigger it in the morning.
Microsoft.Reporting.WinForms.LocalProcessingException:
An error occurred during local report processing. Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'xxx.rdl' is invalid.
But when we could not replicate the issue when we trigger the task scheduler or run the program manually afterwards.
Full error stack:
Error Message : Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'D:\EASI\AutoReport\SSRSReport\Report\1tic_movie_tax_report.rdl' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.Runtime.InteropServices.COMException: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at System.Security.Policy.PEFileEvidenceFactory.GetLocationEvidence(SafePEFileHandle peFile, SecurityZone& zone, StringHandleOnStack retUrl)
at System.Security.Policy.PEFileEvidenceFactory.GenerateLocationEvidence()
at System.Security.Policy.PEFileEvidenceFactory.GenerateEvidence(Type evidenceType)
at System.Security.Policy.AssemblyEvidenceFactory.GenerateEvidence(Type evidenceType)
at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type)
at System.Security.Policy.Evidence.GetHostEvidence(Type type, Boolean markDelayEvaluatedEvidenceUsed)
at System.Security.Policy.AppDomainEvidenceFactory.GenerateEvidence(Type evidenceType)
at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type)
at System.Security.Policy.Evidence.RawEvidenceEnumerator.MoveNext()
at System.Security.Policy.Evidence.EvidenceEnumerator.MoveNext()
at System.Configuration.ClientConfigPaths.GetEvidenceInfo(AppDomain appDomain, String exePath, String& typeName)
at System.Configuration.ClientConfigPaths.GetTypeAndHashSuffix(AppDomain appDomain, String exePath)
at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord record)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Xml.Schema.Parser..ctor(SchemaType schemaType, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler)
at System.Xml.Schema.XmlSchema.Read(XmlReader reader, ValidationEventHandler validationEventHandler)
at Microsoft.ReportingServices.RdlObjectModel2005.Upgrade.UpgradeSerializerSettings2005.CreateReaderSettings()
at Microsoft.ReportingServices.RdlObjectModel2005.Upgrade.UpgradeImpl2005.CreateReaderSettings()
at Microsoft.ReportingServices.ReportProcessing.RDLUpgrader.RdlUpgrader.UpgradeFrom200501(XmlReader xmlReader, Boolean throwUpgradeException, Boolean upgradeDundasCRIToNative, Boolean renameInvalidDataSources, RDLUpgradeResult& upgradeResults)
at Microsoft.ReportingServices.ReportProcessing.RDLUpgrader.RdlUpgrader.UpgradeUnified(Stream stream, XmlReader xmlReader, String namespaceURI, Boolean throwUpgradeException, Boolean upgradeDundasCRIToNative, Boolean renameInvalidDataSources, RDLUpgradeResult& upgradeResults)
at Microsoft.ReportingServices.ReportProcessing.RDLUpgrader.RdlUpgrader.Upgrade(Stream stream, Boolean throwUpgradeException, Boolean upgradeDundasCRIToNative, Boolean renameInvalidDataSources, RDLUpgradeResult& upgradeResults)
at Microsoft.ReportingServices.ReportProcessing.RDLUpgrader.UpgradeToCurrent(Stream stream, Boolean throwUpgradeException, Boolean renameInvalidDataSources, RDLUpgradeResult& upgradeResults)
at Microsoft.ReportingServices.ReportPublishing.RdlObjectModelUpgradeStrategy.Upgrade(Stream definitionStream)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase1(Stream definitionStream, String& description, String& language, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, IDataProtection dataProtection, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection)
at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
--- End of inner exception stack trace ---
at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
at Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot)
at Microsoft.Reporting.LocalService.CompileReport()
at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
--- End of inner exception stack trace ---
at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
at Microsoft.Reporting.WinForms.LocalReport.GetParameters()
at SSRSReport.frmSsrsReport.SetReportParameter(String ReportTitle)
at SSRSReport.frmSsrsReport.ViewReport(Boolean showSplash)
at SSRSReport.frmMain.GenerateAutoReports(DateTime selectedDate)
Code:
1. rptViewer.LocalReport.ReportPath = fileName : executed on function [SSRSReport.frmSsrsReport.ViewReport]
2. rptViewer.LocalReport.GetParameters() : executed on function [SSRSReport.frmSsrsReport.SetReportParameter]
The main message error is same with my problem, but the details are little bit different.
At my case, I need to install MICROSOFT® REPORT VIEWER 2015 RUNTIME then the problem gone.
HTH
Same Error today:
Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'fileName.rdlc' is invalid. --->
The Case is when I develop using old VS2015, and now trying to use VS2019 with the RDLC tool..
The designer is upgrading rdlc file.
I must restore my rdlc file and back to old VS2015, and re-publish it..

Program Does Not Run On Win XP But Will Run On Win7

So I designed a program using Visual Studio 2010 on a Win7 box. For the sake of this the program is called Test.exe
When another user, using Win XP tries to open this program, it pops up a Just In Time Debugger window and never runs. I can open the program on my Win7 box and additional Win7 boxes and each time the program opens.
I'm not exactly sure where to begin to figure out why Win XP machines fail to run this program.
Any suggestions?
EDIT
Here is the exception error we got but running the debugger on the XP machine.
System.InvalidOperationException was unhandled
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Exception has been thrown by the target of an invocation.
Source=WinApp
StackTrace:
at WinApp.My.MyProject.MyForms.Create_Instance_[T](T Instance)
at WinApp.My.MyProject.MyForms.get_Form1()
at WinApp.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WinApp.My.MyApplication.Main(String[] Args)
InnerException: System.Reflection.TargetInvocationException
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
at System.Resources.ResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
at System.Resources.ResourceManager.GetObject(String name)
at WinApp.Form1.InitializeComponent()
at WinApp.Form1..ctor()
InnerException: System.ComponentModel.Win32Exception
Message=The parameter is incorrect
Source=System.Drawing
ErrorCode=-2147467259
NativeErrorCode=87
StackTrace:
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
InnerException:
You'll need to make sure that the Windows XP system has the appropriate version of the .NET Framework installed.
Also, there are many types that will not work on XP within .NET framework 4. For example, if you use the MD5Cng class, you'll see (in the "Platforms" section of the docs) that it's only supported on Vista+, not on XP. Using this class in a program will cause an exception if it's run on XP.
Edit:
From your stack trace, it looks like your Form (WinApp.Form1) is using an Icon (.ico) which is a format that is unsupported by Windows XP. For example, if you use a full color icon, this can raise an exception on XP. Make sure it's a 256 color icon file to work properly on XP.

SharePoint 2010: Error occurred in deployment step 'Activate Features': Could not find any recognizable digits

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

Sharepoint 2010 NullReferenceException

I'm upgrading our SharePoint 2007 install to SharePoint 2010. One of the problems I'm running into is a NullReferenceException when I go to Site Actions -> Site Settings -> Navigation. I'm not sure where or how to start debugging this issue. Anyone have any ideas?
The error message and stack trace I'm getting are:
[NullReferenceException]: Object reference not set to an instance of an object.
at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.FetchDynamicItems(PublishingWeb pubWeb, NodeTypes includedTypes, Boolean& websFetched, Boolean& pagesFetched)
at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildrenInner(NodeTypes includedTypes)
at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildren(NodeTypes includedTypes)
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, Boolean trimmingEnabled, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid)
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.AddChildrenToControl(String parentId, PortalSiteMapNode node, Int32 depth, Int32 maxDepth)
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.InitializeNavigationEditSort()
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaNavigationSettingsPage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
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_areanavigationsettings_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This is happening because you have nodes present in the database but the actual SPSite or SPWeb is not present in the content database. This indicates that one or more site was not completely migrated.
To debug this, write a custom utility, which will iterate over navigation nodes and try to instantiate it as SPWeb object. The failure will indicate the offender.
Are you using a language pack? The problem could be the Pages list is created using a other language.
Take a look at:
http://social.technet.microsoft.com/Forums/sr-Latn-CS/sharepoint2010setup/thread/3e57584c-bebc-4326-9715-91ec9fd66d8d
I had to change "Pages" to "Web Pages" in the Resources\osrvcore.en-US file in the 14 hive:
<Data Name="List_Pages_UrlName">
<Value>WebPages</Value> //Change from "Pages"
</Data>
Once I did that, the error disappeared.

Intermitant DefinitionInvalidException with windows forms ReportViewer 2008

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)