Register custom control in distributed environment

  • 17 April 2015
  • 4 replies
  • 5 views

Badge +1

I have a web server [W01P] installed with runtime and designer, while the blackpearl hosted in app server[A01P].

 

I'm trying to register a custom control [ExcelExport] in W01P, by following the step to run the RegisterCustomControl.bat which look like this:

REM
echo this batch file registers the custom control assembly with K2 smartforms
pause
iisreset
xcopy "ExcelExport.dll" "D:Program Files (x86)K2 blackpearlK2 SmartForms Designerin" /y /r
xcopy "ExcelExport.dll" "D:Program Files (x86)K2 blackpearlK2 SmartForms Runtimein" /y /r
@SET CMD="D:Program Files (x86)K2 blackpearlBincontrolutil.exe" register -assembly:"D:Program Files (x86)K2 blackpearlK2 SmartForms DesignerinExcelExport.dll"
%CMD%

 Copy file function is working fine, but the last part, register, since the blackpearl server hosted on another server [A01P],

when it run it hits the error:

D:Program Files (x86)K2 blackpearlBin>controlutil.exe register -assembly:"D:Program Files (x86)K2 blackpearlK2 SmartForms DesignerinExcelExport.dll" -host:"mykulk2a01d"
SourceCode SmartForms SDK Command-Line Utility

Connecting to Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=localhost;Port=5555...
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5555
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)
at SourceCode.Hosting.Client.BaseAPI.SocketBaseAPIConnection.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnectionBroker.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Open(String connectionString)
at SourceCode.Forms.Management.FormsManager.Open(String connectionString)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.GetFormsManager()
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.RegisterControlTypes(String assemblyPath, List`1 supportAssemblyPaths)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.Main(String[] args)

Press any key to continue...

 When i look into the help command:

D:Program Files (x86)K2 blackpearlBin>controlutil register -help
SourceCode SmartForms SDK Command-Line Utility

-assembly:{assemblyfilepath} not specified

Usage:
controlutil register -assembly:{assemblyfilepath} [-support-assemblies:{assemblyfilepath,assemblyfilepath...}]

Optional Parameters:
host The K2 HostServer name to use (default: localhost)
port The K2 HostServer port to use (default: 5555)

-help Displays general help
command -help Displays help for a specific command

 It mentioned that we can put the optional paramters to set the host and port, i assume that is where we can specific our app server name, great, then i tried and it still point to localhost

D:Program Files (x86)K2 blackpearlBin>controlutil.exe register -assembly:"D:Program Files (x86)K2 blackpearlK2 SmartForms DesignerinExcelExport.dll" -host:"A01P" -port:5555
SourceCode SmartForms SDK Command-Line Utility

Connecting to Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=localhost;Port=5555...
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5555
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)
at SourceCode.Hosting.Client.BaseAPI.SocketBaseAPIConnection.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnectionBroker.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Open(String connectionString)
at SourceCode.Forms.Management.FormsManager.Open(String connectionString)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.GetFormsManager()
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.RegisterControlTypes(String assemblyPath, List`1 supportAssemblyPaths)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.Main(String[] args)

Press any key to continue...

 

Anybody know what is the correct syntax to resgister?

I tried in the single environment which running perfectly, but in distributed environment like this, not sure how to put in the host and port for the command ??

 


4 replies

Userlevel 5
Badge +18

1.  Is the "K2 blackpearl server" service started/running on the A01P server?


 


2.  Are you able to "telnet A01P 5555" from the Smartforms W01P server?  Perhaps inbounding/outbounding firewall rules are blocking TCP connection between servers.


 

Badge +1

Hi Tin,

 

A01P services is up and running, i able to telnet A01P 5555 from W01P as well.

 

Problem is I can't point the controlutil to the right server, which from W01P point the controlutil to A01P, as no matter how i specific different host in the command, it always point to localhost.

Userlevel 5
Badge +18

Please try the cmd without the double quotation marks for the -host parameter:


 


controlutil.exe register -assembly:"D:Program Files (x86)K2 blackpearlK2 SmartForms DesignerinExcelExport.dll" -host:A01P -port:5555
Badge +1

Hi Tin,

 

i had tried before, with or without quote still the same, it still point to the localhost.

 

D:Program Files (x86)K2 blackpearlBin>controlutil.exe register -assembly:"D:Program Files (x86)K2 blackpearlK2 SmartForms DesignerinExcelExport.dll" -host:A01P -port:5555
SourceCode SmartForms SDK Command-Line Utility

Connecting to Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=localhost;Port=5555...
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5555
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)
at SourceCode.Hosting.Client.BaseAPI.SocketBaseAPIConnection.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnectionBroker.OnOpen(SCConnectionStringBuilder connectionStringBuilder)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Open(String connectionString)
at SourceCode.Forms.Management.FormsManager.Open(String connectionString)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.GetFormsManager()
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.RegisterControlTypes(String assemblyPath, List`1 supportAssemblyPaths)
at SourceCode.Forms.Controls.Web.SDK.Installer.Program.Main(String[] args)

Press any key to continue...

 

Reply