Add regex to password complexity in Sitecore 8 - passwords

The requirement is to require users to have complex passwords requiring minimum length of 8 characters. 1+ non alpha numeric character. 1+ lowercase alpha character. 1+ uppercase alpha character. 1+ number.
I can accomplish this by adding the following to the web.config
<add name="sql" type="System.Web.Security.SqlMembershipProvider" connectionStringName="core" applicationName="sitecore" minRequiredPasswordLength="8" minRequiredNonalphanumericCharacters="1" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" passwordStrengthRegularExpression="(?=.{8,})(?=.*[\d])(?=.*[a-z])(?=.*[A-Z]).*" />
passwordStrengthRegularExpression validation seems to not be handled by Sitecore as I get the following unhandled exception when an invalid password is entered:
376 15:59:41 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
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 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Nested Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.ExecuteAjaxMethod(AjaxMethodEventArgs e)
at Sitecore.Web.UI.WebControls.AjaxScriptManager.DispatchMethod(Control control, String parameters)
at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline)
at Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic)
at Sitecore.Web.UI.WebControls.ContinuationManager.RunPipelines()
at Sitecore.Web.UI.WebControls.ContinuationManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Nested Exception
Exception: System.ArgumentException
Message: The parameter 'newPassword' does not match the regular expression specified in config file.
Source: System.Web
at System.Web.Security.SqlMembershipProvider.ChangePassword(String username, String oldPassword, String newPassword)
at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
at Sitecore.Security.SitecoreMembershipProvider.ChangePassword(String username, String oldPassword, String newPassword)
at Sitecore.Security.Accounts.MembershipUserWrapper.ChangePassword(String oldPassword, String newPassword)
at Sitecore.Shell.Applications.Security.SetPassword.SetPasswordPage.OK_Click()
Can this be accomplished by modifying config values or is this something that can easily be accomplished by patching the <loggingin> pipeline?

Looking at the code for the SitecoreMembershipProvider there is a wrapper property for PasswordStrengthRegularExpession and the material methods just hand off processing to the underlying provider, in this case the SqlMembershipProvider. So the error is actually being generated there, as you see from the stack trace.
The exception is actually an expected behaviour for this method according to the MSDN documentation. In your application's login/change password/new user forms you should validate a user's entry against Membership.PasswordStrengthRegularExpression manually to ensure the complexity requirement is met before passing the new value back to Sitecore.
It's hard to tell from your question, but does this cover your case, or are you referring to an error being generated in the Sitecore Change Password dialog (haven't tried that)? If that's the case I would raise a support ticket, as the system really should gracefully cope with that situation. Notwithstanding the documentation eluded to by Nikola (#nsgocev) it seems that at least the author of the Sitecore wrapper did implement at least rudimentary wrappers for this property.

Related

EPiServer-error, Dynamic Data Store 6.2.267.1 can only be used with database version 6204, current version is 6001

I have upgraded a database from EPiServer 5 to 6 R2.
Current database-version is '6103' according to a script run in Microsoft SQL Server Management Studio. However when I try to access the website I get the following error ('current version is 6001'):
Previously a copy of the same database has run successfully with the same website (same web.config and the other files the same (the only difference is the database of the connectionstring).
Dynamic Data Store 6.2.267.1 can only be used with database version 6204, current version is 6001. Make sure both database and assemblies are upgraded correctly.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Dynamic Data Store 6.2.267.1 can only be used with database version 6204, current version is 6001. Make sure both database and assemblies are upgraded correctly.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\87acb86c\7104e381\App_global.asax.j09cuuvu.0.cs Line: 0
Stack Trace:
[InvalidOperationException: Dynamic Data Store 6.2.267.1 can only be used with database version 6204, current version is 6001. Make sure both database and assemblies are upgraded correctly.]
EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.ValidateVersion() +427
EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.get_Connection() +36
EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.CreateCommand() +16
EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.ValidateVersion() +75
EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.Initialize(String name, NameValueCollection config) +564
EPiServer.Data.Dynamic.Providers.DataStoreProvider.CreateInstance(ProviderSettings providerSettings) +198
EPiServer.Data.Dynamic.Providers.DataStoreProvider.CreateInstance() +145
EPiServer.Data.Dynamic.<>c__DisplayClass1.<InternalGet>b__0() +11
EPiServer.Data.Cache.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 action) +140
EPiServer.Data.Cache.ReplicatedCache`1.Add(String key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 action, Boolean broadcast) +28
EPiServer.Data.Dynamic.StoreDefinition.InternalGet(String storeName) +172
EPiServer.Data.Dynamic.EPiServerDynamicDataStoreFactory.CreateStore(String storeName, Type type, StoreDefinitionParameters parameters) +110
EPiServer.Data.Dynamic.EPiServerDynamicDataStoreFactory.CreateStore(Type type) +35
EPiServer.Web.InitializationModule.InitializeDynamicDataStore() +169
EPiServer.Web.InitializationModule.<Initialize>b__1a() +5
EPiServer.Web.InitializeEngine.Initialize() +235
EPiServer.Web.InitializationModule.Initialize(EPiServerSection config, Settings settings, ConnectionStringSettingsCollection connectionStringSettings) +2832
EPiServer.Web.InitializationModule.<StaticInitialization>b__4() +34
EPiServer.Web.InitializeEngine.Initialize() +235
EPiServer.Web.InitializationModule.StaticInitialization() +1490
EPiServer.Web.InitializationModule.Initialize(InitializationEngine context) +47
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +343
EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +83
EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +163
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +68
EPiServer.Global..ctor() +54
ASP.global_asax..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\87acb86c\7104e381\App_global.asax.j09cuuvu.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +23
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +227
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327
How do I resolve this?
Sounds like you have had a mix of hotfixed and non-hotfixed 6 R2 environments.
You need to run the SchemaUpdate.sql script for the database giving the error message you posted.
More info here:
http://world.episerver.com/Blogs/Shahid-Nawaz/Dates/2012/1/General-Hotfix-CMS-6-R2/

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.

What appears to be a .net bug is happening after every recycle of a worker process. Only occurring when I'm using entity-framework

I've written a vb.net project (.net 4) that seems to work perfectly on my windows 7 machine, and seems to work fine when published to a windows server 2003 server.
The issue comes after a few hours on my server, I get the infamous "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information". I haven't seen this problem at all when using visual studio.
Which seems to suggest to me that a reference to a dll / something is lost due to a cache process. Uploading anything to that folder temporally fixes the issue (including a test.txt file). Then after a few hours the issue returns.
I've turned off search indexing on the server and insured that the server is up to date.. but the error keeps on returning. (on investigation it returns every time the worker process recycles)
The issue only seems to appear on certain ascx files, these files reference an EntityDataSource that references an orders table.
Also I have attempted to get the LoaderExceptions and any other data with the following code:
Try
OrdersTable.DataBind()
Catch ex As ReflectionTypeLoadException
Response.Write(ex.Message)
If (Not ex.InnerException Is Nothing) Then
Response.Write(ex.InnerException.Message)
Response.Write(ex.LoaderExceptions)
For Each Parameter As DictionaryEntry In ex.Data
Dim key As Object = Parameter.Key
Dim value As Object = Parameter.Value
Response.Write(key & ":" & value & "<br>\n")
Next
End If
Response.End()
End Try
All that is written is the same error as before "Unable to load one or more of..."
New to the .net framework so any suggestions will be very much appreciated :).
Edit:
Stack trace attached.
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +4
System.Reflection.Assembly.GetTypes() +78
System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action1 logLoadMessage, Object& loaderCookie, Dictionary2& typesInLoading, List1& errors) +166
System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action1 logLoadMessage) +316
System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action1 logLoadMessage) +53
System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action1 logLoadMessage) +93
System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action1 logLoadMessage) +130
System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +585
System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +76
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Have to tried to use the Fusion Log Viewer tool? It should give you some hints, although it's sometimes too verbose... Available here http://msdn.microsoft.com/en-us/library/e74a18c4
In the end the solution that was easiest for me was to not do what was causing the bug to surface.
I now no longer bind any data at design time.
<asp:GridView ID="InvoiceTable" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Invoice_No"
DataSourceID="Invoices" CellPadding="4" ForeColor="#333333"
GridLines="None">
....[skiped for brevity]
</asp:GridView>
</div>
<asp:EntityDataSource ID="Invoices" runat="server"
ConnectionString="name=VetlabEntities1" DefaultContainerName="VetlabEntities1"
EnableFlattening="False" EntitySetName="SALES_MASTER">
</asp:EntityDataSource>
Becomes
<asp:GridView ID="InvoiceTable" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Invoice_No"
DataSourceID="Invoices" CellPadding="4" ForeColor="#333333"
GridLines="None">
....[skiped for brevity]
</asp:GridView>
Protected Sub BindInvoice()
Dim db As New VetlabEntities1
InvoiceTable.DataSource = db.SALES_MASTER
InvoiceTable.DataBind()
End Sub
It also means that I now have to handle deleting / selecting etc. myself, which is a little irritating, however manageable.

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)