Cannot be resolved error when adding custom control from too

Posted by Community Admin on 03-Aug-2018 03:43

Cannot be resolved error when adding custom control from toolbox to page

All Replies

Posted by Community Admin on 11-Feb-2011 00:00

Hi,

I am trying to insert a custom control into my page but I get an error stating the control cannot be resolved. See here: img233.imageshack.us/.../


How can I resolve this? The path is correct (if it isn't, the control does not appear in the toolbox). I assume it is down to one of the settings when I added the control to the toolbox via the Settings area of Sitefinity.


Thanks

Posted by Community Admin on 11-Feb-2011 00:00

Hi G S S,

Use fort slashes instead of back slashes.

All the best,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-Mar-2011 00:00

HI

i am also facing the same error.
Please help me how to resolve it.

I tried with front slash and back slash

Regards,
Aparna

Posted by Community Admin on 14-Mar-2011 00:00

Hi Aparna,

Can you paste the error and the link that you have in the ContentBlock?

All the best,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 14-Mar-2011 00:00

HI Thankyou for Your Response.

I have resolved this error i have place a ~ before the url

Thank You for Your Support.

Regards,
Aparna

Posted by Community Admin on 14-Mar-2011 00:00

Hi

I got one more Error

when i am trying to drag a grid control after adding the xml data source.
when i click on edit  it is giving the error

Server Error in '/Samplecontrol' Application.

Object does not match target type.

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.Reflection.TargetException: Object does not match target type.

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:

[TargetException: Object does not match target type.]
   System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) +9355927
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +100
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.SecurityUtils.MethodInfoInvoke(MethodInfo method, Object target, Object[] args) +163
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +109

[TargetInvocationException: Property accessor 'NegativeStyle' on object 'Telerik.Web.UI.GridHeaderContextMenu' threw the following exception:'Object does not match target type.']
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +400
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +208
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +367
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +367
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.GetProperties(Object instance, ControlData controlData, Int32 depth, String parentPropertyPath, CultureInfo culture) +253
   Telerik.Sitefinity.Web.UI.PropertyEditor.GetPropertyBag() +145
   Telerik.Sitefinity.Web.UI.PropertyEditor.GetScriptDescriptors() +716
   System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +126
   Telerik.Sitefinity.Web.UI.AjaxDialogBase.Render(HtmlTextWriter writer) +103
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +177
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +311
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8662


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


please help

Regards,
Aparna

Posted by Community Admin on 15-Mar-2011 00:00

I am getting the same error as Aparna. 

Here's the stack trace:
 

Server Error in '/' Application.

Object does not match target type.

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.Reflection.TargetException: Object does not match target type.

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:

[TargetException: Object does not match target type.]
   System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) +9355927
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +100
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.SecurityUtils.MethodInfoInvoke(MethodInfo method, Object target, Object[] args) +94
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +101

[TargetInvocationException: Property accessor 'CheckBoxStyle' on object 'UserControls.Login' threw the following exception:'Object does not match target type.']
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +400
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +468
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +693
   Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.GetProperties(Object instance, ControlData controlData, Int32 depth, String parentPropertyPath, CultureInfo culture) +436
   Telerik.Sitefinity.Web.UI.PropertyEditor.GetPropertyBag() +284
   Telerik.Sitefinity.Web.UI.PropertyEditor.GetScriptDescriptors() +1127
   System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +128
   System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +49
   Telerik.Sitefinity.Web.UI.AjaxDialogBase.Render(HtmlTextWriter writer) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Posted by Community Admin on 15-Mar-2011 00:00

hi Any solution please help at the earlist

Posted by Community Admin on 15-Mar-2011 00:00

Hi Abraham,

This is not the same error. In your case you are using UserControls.Login. Is this a custom control you use? What are the steps you followed prior the error?

Greetings,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 18-Mar-2011 00:00

Ivan,
    You are right.  My situation was different.  I was trying to implement a user control in a separate library and it was not working.  I found your documentation on how to create a widget (http://www.sitefinity.com/documentation/how-to-create-a-widget.aspx).  Once I followed the instructions it worked just fine.  Thanks.

Abraham

This thread is closed