When we try to rebuild our Lucene (ContentSearch) indexes, our CrawlingLog is filled up with these exceptions:
7052 15:08:21 WARN Crawler : AddRecursive DoItemAdd failed - {5A1E50E4-46B9-42D5-B743-1ED10D15D47E}
Exception: System.AggregateException
Message: One or more errors occurred.
Source: mscorlib
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at Sitecore.ContentSearch.AbstractDocumentBuilder`1.AddItemFields()
at Sitecore.ContentSearch.LuceneProvider.CrawlerLuceneIndexOperations.GetIndexData(IIndexable indexable, IProviderUpdateContext context)
at Sitecore.ContentSearch.LuceneProvider.CrawlerLuceneIndexOperations.BuildDataToIndex(IProviderUpdateContext context, IIndexable version)
at Sitecore.ContentSearch.LuceneProvider.CrawlerLuceneIndexOperations.Add(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration)
at Sitecore.ContentSearch.SitecoreItemCrawler.DoAdd(IProviderUpdateContext context, SitecoreIndexableItem indexable)
at Sitecore.ContentSearch.HierarchicalDataCrawler`1.CrawlItem(Tuple`3 tuple)
Nested Exception
Exception: System.ArgumentOutOfRangeException
Message: Index and length must refer to a location within the string.
Parameter name: length
Source: mscorlib
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at Sitecore.Data.ShortID.Encode(String guid)
at Sitecore.ContentSearch.FieldReaders.MultiListFieldReader.GetFieldValue(IIndexableDataField indexableField)
at Sitecore.ContentSearch.FieldReaders.FieldReaderMap.GetFieldValue(IIndexableDataField field)
at Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilder.AddField(IIndexableDataField field)
at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
This appears to be caused by the ShortID.Encode(string) method expecting the GUID in the string parameter to have brackets (" { " and " } ") around it. Some of our multilist field relationships were associated programmatically using Guid.ToString(), which does not include the brackets. Unfortunately, these values cause the ShortID.Encode() method to choke.
First things first: find all the places you call MultiListField.Add(string) and change Guid.ToString() to Guid.ToString("B"). This will resolve the issue for all new relationships.
Create a custom FieldReader class to replace the standard MultiListFieldReader (we called ours CustomMultiListFieldReader).
Set your custom class to inherit from Sitecore.ContentSearch.FieldReaders.FieldReader.
Decompile the Sitecore.ContentSearch.FieldReaders.MultiListFieldReader.GetFieldValue(IIndexableDataField) method into your custom class.
Before the if (ID.IsID(id)) line, add the following code:
if (!str.StartsWith("{") && !str.EndsWith("}"))
id = String.Format("{{{0}}}", str);
In your index configuration (we added ours to the default, Sitecore.ContentSearch.DefaultIndexConfiguration.config) change the fieldReaderType for the MultiList fields to your custom type. (This can be found in your config at sitecore/contentSearch/configuration/defaultIndexConfiguration/fieldReaders/mapFieldByTypeName/fieldReader.)
Full disclosure: I don't love this approach because if the default implementation of the MultiListFieldReader ever changed, we'd be without those changes. But this allows the items to be included in the index without reformatting all of the GUIDs in every multilist field.
Related
Periodically we receive the following error when saving to a Raven Database. The client and database are v3.5. The solution thus far has been to restart the servers and after that things appear to settle down. The user can go to a different server and can go back into the site and retrieved what was saved. However when we see 1 error like this on a server the server starts to report 100's of them. We cannot reproduce this in QA. So I am leaning towards load or our Raven Sessions are not being closed properly.
Calling the Raven OpenSessionAsync() as the point of creating the class
IAsyncDocumentSession
public async Task<bool> SaveChangesAsync()
{
using (_session)
{
await _session.SaveChangesAsync();
}
return true;
}
This is the area in our code that starts the error when saving should we also be doing something more?
Message: Token PropertyName in state Property would result in an invalid JSON object. Path ''.
Raven.Imports.Newtonsoft.Json.JsonWriter.AutoComplete(JsonToken tokenBeingWritten) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonWriter.cs:779
Raven.Json.Linq.RavenJTokenWriter.WritePropertyName(String name) in C:\Builds\RavenDB-Stable-3.5\Raven.Abstractions\Json\Linq\RavenJTokenWriter.cs:51
Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalWriter.cs:428
Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalWriter.cs:101
Raven.Imports.Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonSerializer.cs:949
Raven.Json.Linq.RavenJToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) in C:\Builds\RavenDB-Stable-3.5\Raven.Abstractions\Json\Linq\RavenJToken.cs:91
Raven.Json.Linq.RavenJObject.FromObject(Object o, JsonSerializer jsonSerializer) in C:\Builds\RavenDB-Stable-3.5\Raven.Abstractions\Json\Linq\RavenJObject.cs:174
Raven.Client.Document.EntityToJson.GetObjectAsJson(Object entity) in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\EntityToJson.cs:72
Raven.Client.Document.EntityToJson.ConvertEntityToJson(String key, Object entity, RavenJObject metadata) in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\EntityToJson.cs:44
Raven.Client.Document.InMemoryDocumentSessionOperations.EntityChanged(Object entity, DocumentMetadata documentMetadata, IDictionary2 changes) in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\InMemoryDocumentSessionOperations.cs:1218
Raven.Client.Document.InMemoryDocumentSessionOperations.<PrepareForEntitiesPuts>b__110_0(KeyValuePair2 pair) in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\InMemoryDocumentSessionOperations.cs:1025
System.Linq.Enumerable+WhereEnumerableIterator1.MoveNext():55
System.Linq.Buffer1..ctor(IEnumerable1 source):114
System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source):20
Raven.Client.Document.InMemoryDocumentSessionOperations.PrepareForEntitiesPuts(SaveChangesData result) in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\InMemoryDocumentSessionOperations.cs:1025
Raven.Client.Document.InMemoryDocumentSessionOperations.PrepareForSaveChanges() in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\InMemoryDocumentSessionOperations.cs:986
Raven.Client.Document.Async.AsyncDocumentSession+d__73.MoveNext() in C:\Builds\RavenDB-Stable-3.5\Raven.Client.Lightweight\Document\Async\AsyncDocumentSession.cs:928
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():12
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task):46
ApplicantCenter.Services.ApplicationService+d__9.MoveNext() in d:\a\1\s\Project\Services\ApplicationService_Helpers.cs:207
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():12
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task):46
ApplicantCenter.Controllers.ApplicationController+d__10.MoveNext() in d:\a\1\s\Project\Controllers\ApplicationController.cs:117
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():12
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task):46
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass8_0.b__1(IAsyncResult asyncResult)
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters.b__11_0():19
System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass11_1.b__2():134
System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass11_1.b__2():134
System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass11_1.b__2():134
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass3_6.b__3()
System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass3_1.b__5(IAsyncResult asyncResult)
The problem here is that you are disposing the session that maybe used by others.
You put a global _session inside an using block, the _session resources will be disposed after the using block end, and other parts of code that are using the same global _session will become 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..
I updated VS 2015 to Update 2 along with the 1.3 SDK, now when I open a xaml file the designer seems to be working hard and hanging all of VS. When closing shows there was an exception, checking the log it shows this:
Any workaround yet?
<entry>
<record>919</record>
<time>2016/04/05 16:54:19.061</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostProject.get_CodeDocumentTypeIdentifier()
at Microsoft.VisualStudio.DesignTools.HostUtility.Extensions.HostExtensions.IsCPlusPlusProject(IHostProject project)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Metadata.ManagedTypeResolverService.GetTypeResolver(IHostProject hostProject)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext& fileContext)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextView view)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlSource.BeginParse(Int32 line, Int32 idx, TokenInfo info, ParseReason reason, IVsTextView view, ParseResultHandler callback)
at Microsoft.VisualStudio.Package.ViewFilter.GetDataTipText(TextSpan[] aspan, String& textValue)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String& tipText)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()</description>
This one shows too:
<entry>
<record>917</record>
<time>2016/04/05 16:52:01.816</time>
<type>Error</type>
<source>XAML Designer</source>
<description>XAML Designer Exception
Type: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: source
Stack:
at System.Linq.Enumerable.SelectMany[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.GenerateExtensionsXml(IHostProject project, ManifestSchema schema)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.<>c__DisplayClass33_0.<GenerateManifestContents>b__0()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass48_0`1.<MarshalIn>b__0()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvoke(Boolean inbound, Action action, Int32 sourceApartmentId, Int32 targetApartmentId, Int32 originId, WaitHandle aborted)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvokeInbound(Action action, Int32 targetApartmentId)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.GenerateManifestContents(IEnumerable`1 dependencyIdentifiers, IHostProject project, String& packageId)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlAppPackage.CreateManifestFile()
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.AppPackage.InitializeApplication()
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlAppPackage.CreateOrRecover(IHostProject project, IHostProjectService projectService, IHostPlatformService platformService, IHostShadowCopyService shadowCopyService, PackageService packageService, IHostFileChangeWatcherService fileChangeWatcherService, String frameworkPackagePath)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.<>c__DisplayClass10_0.<.ctor>b__0(IHostProject project, IHostProjectService projectService, IHostPlatformService platformService, IHostShadowCopyService shadowCopyService)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.CreateAppPackage(IHostProject hostProject)
at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.GetOrCreateAppPackage(IHostProject project, Boolean& isCreated)
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostProject.get_AppPackage()
at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.InitializePrimaryProject(IHostProject project)
at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.InitializeLanguageContextComponents(IHostProject project)
at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
</description>
When I create a new project the designer works fine but I get the following error on project properties on Application tab:
Property accessor 'TargetDescriptions' on object 'Microsoft.VisualStudio.ProjectFlavoring.Automation.Project.CommonProjectExtender' threw the following exception:'Value cannot be null.
This happens either if I keep min version 10.0.10240 or leave min as 10586
Removing SDK 10240 worked to solve the designer issue in my "old" project, still the error at the project properties happens
UPDATE:
I completely uninstalled the Windows 10 SDK, along with the 8.1 SDK, then reinstalled only 10 SDK (10586) using the VS installer from the dev site https://developer.microsoft.com/en-us/windows/downloads
And it's worse now, I can't compile, the application tab in properties now says this:
An error occurred trying to load the page.
InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex
Also when I try to create a new Blank Universal app I get the following message:
"Could not find a suitable SDK to target"
Well, the only thing that worked was uninstalling all standalone Windows SDKs, from 10586.11, 10586.15 and before, then reinstalling the 10586.15 again, this worked finally, just in case someone gets into this
Has anyone encountered this?
After upgrading to NHibernate 3.1, I am receiving the following exception from NHibernate Validator when running NUnit test cases:
System.NotSupportedException : The invoked member is not supported in
a dynamic assembly. at
System.Reflection.Emit.InternalAssemblyBuilder.GetManifestResourceStream(String
name) at
NHibernate.Validator.Cfg.XmlMappingLoader.AddResource(Assembly
assembly, String resource) at
NHibernate.Validator.Cfg.XmlMappingLoader.GetXmlMappingFor(Type type)
at
NHibernate.Validator.Engine.JITClassMappingFactory.GetExternalDefinitionFor(Type
type) at
NHibernate.Validator.Engine.JITClassMappingFactory.GetClassMapping(Type
clazz, ValidatorMode mode) at
NHibernate.Validator.Engine.ClassValidator.InitValidator(Type clazz,
IDictionary`2 nestedClassValidators) at
NHibernate.Validator.Engine.ClassValidator..ctor(Type clazz,
IConstraintValidatorFactory constraintValidatorFactory, IDictionary`2
childClassValidators, IClassValidatorFactory factory) at
NHibernate.Validator.Engine.StateFullClassValidatorFactory.GetRootValidator(Type
type) at
NHibernate.Validator.Engine.ValidatorEngine.GetClassValidator(Type
entityType) at
NHibernate.Validator.Engine.ValidatorEngine.GetElementOrNew(Type
entityType) at
NHibernate.Validator.Engine.ValidatorEngine.InternalValidate(Object
entity, Object[] activeTags) at
NHibernate.Validator.Engine.ValidatorEngine.Validate(Object entity,
Object[] activeTags) at
NHibernate.Validator.Event.ValidateEventListener.Validate(Object
entity, EntityMode mode) at
NHibernate.Validator.Event.ValidatePreUpdateEventListener.OnPreUpdate(PreUpdateEvent
event) at NHibernate.Action.EntityUpdateAction.PreUpdate() in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Action\EntityUpdateAction.cs:
line 200 at NHibernate.Action.EntityUpdateAction.Execute() in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Action\EntityUpdateAction.cs:
line 58 at NHibernate.Engine.ActionQueue.Execute(IExecutable
executable) in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\ActionQueue.cs: line
136 at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\ActionQueue.cs: line
126 at NHibernate.Engine.ActionQueue.ExecuteActions() in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Engine\ActionQueue.cs: line
170 at
NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource
session) in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Event\Default\AbstractFlushingEventListener.cs:
line 241 at
NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent
event) in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Event\Default\DefaultFlushEventListener.cs:
line 19 at NHibernate.Impl.SessionImpl.Flush() in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl\SessionImpl.cs: line
1472 at TestDataAccess.FooTest.TestFoo() in FooTest.cs
As you can see from the stack trace, the error occurs when the session is flushed and NHibernate Validator does its thing.
Update I have tried stepping through the NH Validator code and it appears that at some point it is trying to validate the Castle proxy of an entity, rather than the underlying entity itself. This then causes the trouble. No idea what to do about this...
Update The problem goes away if I use the LinFu ProxyFactoryFactory, rather than Castle. Unfortunately, LinFu is giving me other problems so I don't want to use it.
NHibernate 3.2 removed the need for external proxy libraries.
They are still supported, but they are not distributed anymore, and the default is to use an internal implementation.
Have you tried upgrading?
Update: in order to compile NHibernate Validator for NH 3.2, you need to modify NHibernateHelper as follows:
public static bool IsProxyFactoryConfigurated()
{
var f = NHibernate.Cfg.Environment.BytecodeProvider.ProxyFactoryFactory;
return f != null;
}
For details, read NHV-116
I've been making my first ASP.NET Visual Studio website and I have just started working with databases, I've made a table and a backoffice page for me to control the content of my table.
This page follows the following rules:
-> I've added the SQLDataSource and configured.
-> I've added a gridview to see my content and configured it to my SQLDataSource, here I've added the Edit/Delete options.
-> I've added a DetailsView configured to my SWLDataSource, here I've added New option (to create new entries in my table)
My database has the id column set as primary key (data type=int; allow nulls=not checked)
Every time I try to update my data base through this backoffice page I get the following error:
Updating is not supported by data
source 'SqlDataSource1' unless
UpdateCommand is specified.
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.NotSupportedException: Updating
is not supported by data source
'SqlDataSource1' unless UpdateCommand
is specified.
Source Error:
An unhandled exception was generated
during the execution of the current
web request. Information regarding the
origin and location of the exception
can be identified using the exception
stack trace below.
Stack Trace:
[NotSupportedException: Updating is
not supported by data source
'SqlDataSource1' unless UpdateCommand
is specified.]
System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary
keys, IDictionary values, IDictionary
oldValues) +1644420
System.Web.UI.DataSourceView.Update(IDictionary
keys, IDictionary values, IDictionary
oldValues,
DataSourceViewOperationCallback
callback) +92
System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow
row, Int32 rowIndex, Boolean
causesValidation) +907
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs
e, Boolean causesValidation, String
validationGroup) +704
System.Web.UI.WebControls.GridView.OnBubbleEvent(Object
source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object
source, EventArgs args) +37
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object
source, EventArgs e) +123
System.Web.UI.Control.RaiseBubbleEvent(Object
source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs
e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
+13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +1565
I could really use some help here!
The errormessage says it all : 'Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified.'. You have to assign sql code or the name of a stored procedure to the property UpdateCommand so that the SqlDataSource knows how to handle your update.