Cannot de-register custom control

  • 19 August 2014
  • 4 replies
  • 2 views

Badge +10

HI all,

 

I been redaing the guide to deregister custom controls here but having no luck. 

 

I have tried this method:

 

controlutil deregister -assembly:{assemblyfilepath}

 

Both fromt eh runtime and designer folders. Restarted blackpearl. But the control is still visible on the  smartfroms designer.

 

I have not tried this method

 

controlutil deregister -control:{controltypename}

 

Because I do not know what to pass to this command. Looking at the database Form.Control_Type. There is a display name and name field not sure what to pass to this command. Do both commands have to be executed or is one sufficient.

 

Thanks in advance.

 


4 replies

Badge +10

Right, Ive managed to deregister another control. I ran the -assembly deregister from both runtime and designer and then ran the -control deregister using the name of the control. I am not getting an error when de-registering one of the controls because in the Form.Control_Type table there are two controls with the name but different displaynames. Not sure how to differentiate between the two but I ran the -control deregister command anyway and got the following error.

 

Control Type has Instances. I have checked all views and forms to see if they contain any of the two controls. The controls are not used in any of the views or forms. 

 

System.Data.SqlClient.SqlException: ControlTypeHasInstances,HTML Editor
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String Type
Name, String MethodName, Object[] Parameters, Boolean[] NullList, MarshalMessage
Type CallType)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteCall(String TypeName, Stri
ng MethodName, Object[] Parameters, Boolean[] NullList, MarshalMessageType CallT
ype)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteSessionCall(String TypeNam
e, String MethodName, Object[] Parameters, Boolean[] NullList)
at SourceCode.Forms.Management.FormsManager.DoSessionCall(String method, Obje
ct[] parameters, Boolean[] nullList)
at SourceCode.Forms.Management.FormsManager.DeleteControlType(String name, St
ring replaceWith)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.DeregisterControlType(
String host, UInt32 port, String controlTypeName, String replaceWith)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.Main(String[] args)

 

Thanks

Badge +6

Hi s0m3one,


 


The reason for this error is because the control is still being referenced in the Form.Control_History table in SQL. This is a known issue, but can you confirm for me what version of BP and SF you are currently running so I can find out if the issue has been resolved in the latest versions of K2 products?


 


Kind Regards,


 


Yannick

Badge +10

Thanks for you reply yannick. I have now managed to deregister the control successfully.

Not entirely sure what happended tbh. Firstly I restarted blackpearl and reset IIS.

That didnt work so I restarted the computer and ran the commands successfully.

Now the controls have been removed from the designer.

Badge +6

Hi s0m3one,


 


That is very strange, but im glad the issue is resolved.


 


Kind regards,


 


Yannick

Reply