Sharepoint 2010 Content Organizer Unknown Error - sharepoint-2010

I am having an issue with SharePoint 2010 where the Content Organizer is giving an Unknown Error when we send a Document Set to the repository. Our workflows have not changed and after checking the ULS logs, we found this additional error message:
System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPFieldLookupValue.ParseLookupId(String fieldValue) at Microsoft.SharePoint.SPFieldLookupValue..ctor(String fieldValue) at Microsoft.SharePoint.SPFieldUserValue..ctor(SPWeb web, String fieldValue) at Microsoft.Office.DocumentManagement.CommonUtility.GetUserFieldValueByLoginName(SPField fld, SPListItem item, Boolean dropSharePointGroups) at Microsoft.Office.DocumentManagement.CommonUtility.GetFieldValueAsString(SPListItem item, SPField fld, Boolean dropSharePointGroups) at Microsoft.Office.DocumentManagement.CommonUtility.GetFileSubmissionPropertyArray(SPListItem item, Boolean bIncludeAuditHistory, Boolean bUseFieldGuid, Boolean dropSharePointGroups) at Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet.RgofpFromListItem(SPListItem item, SPOfficialFileAction postOp) at Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet.SendToOfficialFile(String strRecordSeries, String& strAdditionalInfo, SPOfficialFileHost targetHost, String submitter, SPOfficialFileSubmissionMode submissionMode) at Microsoft.Office.Workflow.Actions.SubmitDocSetActivity.Execute(ActivityExecutionContext context) at System.Workflow.ComponentModel.ActivityExecutor1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()
I only have a very basic understanding of the front end of SharePoint and workflows so I don't know what I'm looking at here. I see that there is a value that doesn't fall within the expected range, but I don't know what value it's referencing or how to change the value to place it in the expected range. Any help would be appreciated.

Please try this fix....the error is in the workflow history logs. If you set the workflow auto cleanup timer job to 5min then wait for logs to clear out the history of deleted workflows the error will go away.
stsadm -o setproperty -pn job-workflow-autoclean -pv "Every 5 minutes between 0 and
59" -url http://yoursite

Related

Orchard- All Indexes Rebuild Failing

I have been having an issue where Indexes for Search have been failing for a while it seemed like new indexes weren't getting created. I went to rebuild the Search index using that rebuild button, and all the documents that were previously indexed were no longer indexed.
I followed this article without results: Orchard - Search & Indexing issue
This did not work. I think probably because
App_data\Sites\Default\Search.settings.xml
doesn't get generated in the first place. I do however see a file:
App_data\Sites\Default\Search.settings.xml.lock
I believe the Orchard.Indexing.Services.IndexingTaskExecutor UpdateIndexBatch method is failing because my impression is the lock file would be created and then deleted if it was working. Here is a possibly relevant error:
2021-01-08 00:00:41,174 [48] Orchard.Exceptions.DefaultExceptionPolicy - Default - An unexpected exception was caught
(null)
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints)
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options)
at Orchard.Indexing.Services.IndexingTaskExecutor.b__0(ContentItemVersionRecord versionRecord)
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__641.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Orchard.Indexing.Services.IndexingTaskExecutor.BatchIndex(String indexName, String settingsFilename, IndexSettings indexSettings) at Orchard.Indexing.Services.IndexingTaskExecutor.UpdateIndexBatch(String indexName) at Orchard.Indexing.Services.UpdateIndexScheduler.UpdateIndex(String indexName) at Orchard.Events.DelegateHelper.<>c__DisplayClass2b2.b__2a(Object target, Object[] p)
at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String messageName, String interfaceName, String methodName, IDictionary2 arguments, IEnumerable& returnValue) at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary2 eventData, IEnumerable& returnValue)
Another error I see that I believe is related to the issue seems to occur in Orchard.Indexing.Handlers.InfosetFieldIndexingHandler
2021-01-08 00:00:02,236 [48] Orchard.ContentManagement.DefaultContentManager - Default - NullReferenceException thrown from IContentHandler by Orchard.Indexing.Handlers.InfosetFieldIndexingHandler
(null)
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.Fields.Fields.DateTimeField.get_DateTime()
at Orchard.Fields.Drivers.DateTimeFieldDriver.b__15(DateTimeField field)
at Orchard.ContentManagement.Handlers.DescribeMembersContext.Enumerate[TField](Func1 enumerate) at Orchard.Fields.Drivers.DateTimeFieldDriver.Describe(DescribeMembersContext context) at Orchard.ContentManagement.Drivers.ContentFieldDriver1.Orchard.ContentManagement.Drivers.IContentFieldDriver.Describe(DescribeMembersContext context)
at Orchard.Indexing.Handlers.InfosetFieldIndexingHandler.<.ctor>b__0(IndexContentContext context, InfosetPart cp)
at Orchard.ContentManagement.Handlers.ContentHandler.InlineStorageFilter1.Indexing(IndexContentContext context, TPart instance) at Orchard.ContentManagement.Handlers.StorageFilterBase1.Orchard.ContentManagement.Handlers.IContentStorageFilter.Indexing(IndexContentContext context)
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.Indexing(IndexContentContext context)
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass99.b__97(IContentHandler handler)
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable1 events, Action1 dispatch, ILogger logger)
To note, I did try to generate a new index and just have it index news articles. This did not work, or generate the settings.xml file either.
Is there a database location that I should be looking at that could be containing null dates, or should I be looking elsewhere? Any help would be greatly appreciated.
Edit: It has been two days and no responses, so I made a post with updated details on git (in case someone is looking for an answer to the same question, and in case git hub has an answer git hub issue)
The solution was found. There was some null data within ContentItemRecord. The null Data and ContentType_id resulted in no indexes being built even unrelated index.
Here is the query we used to find the bad data. The xxxxxx would need to be replaced by whatever prefix is associated with your table, but gives you an idea what to do.
SELECT *
FROM [dbo].[xxxxxx_Orchard_Framework_ContentItemVersionRecord] civr
LEFT JOIN [dbo].[xxxxxx_Orchard_Framework_ContentItemRecord] cir ON civr.ContentItemRecord_id = cir.Id
LEFT JOIN [dbo].[xxxxxx_Orchard_Framework_ContentTypeRecord] ctr ON cir.ContentType_id = ctr.Id
WHERE cir.Id IS NULL OR cir.Data IS NULL OR ctr.Id IS NULL

Getting UnauthorizedAccessException when deploying asp.net core app using Kudu build service

I have set up Continuous Deployment of my aspnet core 2.2 app using Kudu build service (directly connected through GitHub). It was fine until the day before yesterday but started getting UnauthorizedAccessException when I try to deploy anything since yesterday. Nothing changed in my application though. Any idea what could be wrong here??
Here is the detail exception:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Internal.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Internal.Win32.RegistryKey.SetValue(String name, String value)
at System.Environment.SetEnvironmentVariableFromRegistry(String variable, String value, Boolean fromMachine)
Failed exitCode=1, command=dotnet restore "D:\home\site\repository\myproject.sln"
at System.Environment.SetEnvironmentVariable(String variable, String value, EnvironmentVariableTarget target)
An error has occurred during web site deployment.
at Microsoft.DotNet.Cli.Utils.EnvironmentProvider.SetEnvironmentVariable(String variable, String value, EnvironmentVariableTarget target)
at Microsoft.DotNet.ShellShim.WindowsEnvironmentPath.AddPackageExecutablePathToUserPath()
at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean hasSuperUserAccess, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.\r\n at Internal.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)\r\n at Internal.Win32.RegistryKey.SetValue(String name, String value)\r\n at System.Environment.SetEnvironmentVariableFromRegistry(String variable, String value, Boolean fromMachine)\r\n at System.Environment.SetEnvironmentVariable(String variable, String value, EnvironmentVariableTarget target)\r\n at Microsoft.DotNet.Cli.Utils.EnvironmentProvider.SetEnvironmentVariable(String variable, String value, EnvironmentVariableTarget target)\r\n at Microsoft.DotNet.ShellShim.WindowsEnvironmentPath.AddPackageExecutablePathToUserPath()\r\n at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()\r\n at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean hasSuperUserAccess, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider)\r\n at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)\r\n at Microsoft.DotNet.Cli.Program.Main(String[] args)\r\nD:\Program Files (x86)\SiteExtensions\Kudu\86.20224.4450\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
After trying "dotnet restore --help" inside kudu and getting the same error I realized that the error was connected to doing "dotnet restore" inside kudu and not with my application.
After looking at the code related to the error message
https://github.com/dotnet/sdk/blob/5d747e7b4f1450a00eff5844bd76b73588531b2c/src/Cli/dotnet/Program.cs#L152
I realized that I could solve the issue by adding a new application setting with the name DOTNET_ADD_GLOBAL_TOOLS_TO_PATH and the value false
Application setting
After that I could deploy my application using kudu as I did before.

Using a [file] datasource with WordDocument.MailMerge

I get sent a log file each time this error happens, so it is definitely happening, I just haven't been able to find out how to reproduce it, or why its occurring.
I merge a Word document with a .dat file (through vb.net), my code that does the merge is simple:
document.WordDocument.MailMerge.OpenDataSource(document.MergeFilePath, wdOpenFormatText, , , False)
document.MergeFilePath points to a local physical .dat file that contains a datasource for the document to use.
On certain clients, this (intermittently) causes an error, some errors are different, but most are Exception: Word was unable to open the data source.
I have tried checking the following properties, when the document is merging, to ensure that they are correctly set / in the correct state before attempting to set the datasource:
Application.PrintPreview | Changed the ActiveWindow.View.Type | (from wdReadingView) | Options.AllowReadingMode.
Again, on my side this is all working perfectly fine and I haven't been able to get any errors - although I know they are occurring.
My log file has this in it:
Office version: Office2013
Word ViewType: wdNormalView
Word PrintPreview: False
Word AllowReadingMode: False
Exception details:
Stack Trace: at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) at [PROJECT PATH].MergeDocument(Document& [document Object]) in [PROJECT Path]\FILENAME.vb:line 695
Things to note:
I've noticed it seems to only be on Office2013 (used to be all versions), but
seems the above changes fixed 2016).
I think it has to do with a document (or multiple documents) being
in a readMode state at some point
Something must be happening where it 'locks' certain properties and hence,
we are unable to update the datasource on the document.
Any help or a nudge in the right direction would be greatly appreciated.

Validation of Anti-XSRF token failed error

I am using VS2012's register control. I added a custom code after the sign up is finalized (the continue button) which leads to a second form where other information is filled. Every time I create an account it throws the following exception: Validation of Anti-XSRF token failed. Honestly this is the first time I've seen this error. The account is properly created, but I can't have it blowing up every time someone wants to continue with the sign up. Any help would be appreciated!
Stack trace:
[InvalidOperationException: Validation of Anti-XSRF token failed.]
aSuite.SiteMaster.master_Page_PreLoad(Object sender, EventArgs e) in C:\Users\Administrator\Documents\Visual Studio 2012\Projects\aSuite\aSuite\Site.Master.vb:40
System.Web.UI.Page.OnPreLoad(EventArgs e) +121
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +699
Make sure the view state on your page is set to be true or even remove it as the default is true. This error may occur if EnableViewState was set to be false in your page declaration.
EnableViewState="true"

Windows Service Fails on Launch

I'm trying to write a windows service. It installs fine, but fails when I run it with the following exception. I've searched for the string "MyNewProgramService", but I can't find any conversions that would throw this error. I've also added try/catch blocks to a bunch of code with custom exception handling without finding where this exception is occuring. I'm thinking it's somewhere in the auto-generated configuartion/setup code. Any ideas?
Event Type: Error
Event Source: MyNewProgram Event
Category: None Event
ID: 0
Date: 4/15/2010
Time: 12:48:34 PM
User: N/A
Computer: 20F7KF1
Description: Service cannot be started. System.InvalidCastException:
Conversion from string "MyNewProgramService" to type 'Integer' is not valid. --->
System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value,
NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at TaskManagerFailureHandlerService.MyNewProgramService.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
it falls in method MyNewProgramService.OnStart, there Conversions.ToInteger is called somewhere. Just search for it in method. Then check parameter. It might come from config or something, thats why you don't see string in text.
Check your configuration file.
You might also check the account the service is running as. Just as a test go to the login tab in the services list and have it login under your own account. If the problem vanishes it's a permissions problem.