Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

OData: Specified method is not supported error when creating items

« Go Back

Information

 
Article Number000102285
EnvironmentProduct: Sitefinity
Version: 9.x, 10.x, 11.x, 12.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description
An error with message "Specified method is not supported" error when an item is created or modified using the OData services.
Steps to Reproduce
Clarifying Information
Error MessageMessage: HandlingInstanceID: 810050a6-61ad-4e0e-ac54-fbc03db6c0da
An exception of type 'System.NotSupportedException' occurred and was caught.
----------------------------------------------------------------------------
Type : System.NotSupportedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Specified method is not supported.
Source : Telerik.Sitefinity.Model
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void SetValue(System.Object, System.Object)
HResult : -2146233067
Stack Trace : at Telerik.Sitefinity.Descriptors.RelatedDataPropertyDescriptor.SetValue(Object component, Object value)
at Telerik.Sitefinity.Web.Api.OData.Model.PropertyStrategies.PropertyStrategyBase.SetValue(Object value, Object item, IManager manager)
at Telerik.Sitefinity.Web.Api.Strategies.ItemStrategyBase.UpdateItem(Object item, IDictionary`2 properties, IManager itemManager)
at Telerik.Sitefinity.Web.Api.Strategies.ItemStrategyBase.UpdateValues(Object item, IDictionary`2 properties, Boolean forceFullValidation)
at Telerik.Sitefinity.Web.Api.Strategies.LocatableItemStrategy`1.UpdateValues(Object item, IDictionary`2 properties, Boolean forceFullValidation)
at Telerik.Sitefinity.Web.Api.Strategies.LifecycleItemStrategy`1.UpdateValues(Object item, IDictionary`2 properties, Boolean forceFullValidation)
at Telerik.Sitefinity.Web.Api.Strategies.DefaultItemStrategy`1.Update(Guid key, IDictionary`2 properties)
at Telerik.Sitefinity.Web.Api.Strategies.SavingStrategyWrapper.Update(Guid key, IDictionary`2 properties)
at Telerik.Sitefinity.Web.Api.OData.Controllers.DynamicDataController.Patch(Guid key, IEdmStructuredObject entity)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
Defect/Enhancement Number
Cause
A related data item property is part of the request payload.
Resolution
Setting the value of a related data field directly through the payload is not supported. Remove all related data properties from the request payload used for creating/modifying an item.

Refer to the documentation article from the notes for more information on how to add a relation using the new interface.
Workaround
Notes
References to Other Documentation:
Sitefinity Documentation, Related data operations https://www.progress.com/documentation/sitefinity-cms/related-data-operations
Attachment 
Last Modified Date3/25/2020 7:15 AM