Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 18
Registered: ‎11-07-2016

Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

[ Edited ]

Hi

 

Used: http://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/MSBuild-Script-For-Creating-Cust...

 

To create a custom Geospatial Portal template. When I try to create a new instance I get a "Service creation failed" error. I check the log and an exception is raised becuase the service could not find the web.config file in "C:\Program Files\Hexagon\Services\Instances\<INSTANCE NAME>". When I check the files in "C:\Program Files\Common Files\Hexagon\Services\Templates\<TEMPLATE NAME>", there is no Web.Config file, nor is there any javascript files or any of the other application files other than folders named "App_LocalResources", "bin" and "xsl". 

 

Any idea what is happening here?

 

Technical Evangelist
Posts: 1,118
Registered: ‎09-11-2015

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hi Brad,

 

After the sample build script builds the solution, all files should be placed at C:\MyTemplates\<YourCustomPortalNam>, can you see them there? The folder structure should be the same as C:\Program Files\Common Files\Hexagon\Services\Templates\Geospatial Portal

 

Jan

 

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Occasional Contributor
Posts: 18
Registered: ‎11-07-2016

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hi

 

Attached is the screen output from MSBuild script and of the files in C:\MyTemplates after the MSBuild script is run. I have Visual Studio 2010, does that make any difference?

 

 

 

 

Technical Evangelist
Posts: 1,118
Registered: ‎09-11-2015

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

I personally haven't tried the Visual Studio 2010, I always use the later version (2013+) which can download few required NuGet packages automatically. You can try the newer version for free. Later on, Microsoft Account will be required and also probably some kind of license.

 

The build.xml was designed for Visual Studio 2013 so I can't tell if it will work properly with older versions. If VS upgrade is not possible, then I'd suggest to simply build the solution through VS GUI and then copy the generated files manually to appropriate folders.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Occasional Contributor
Posts: 18
Registered: ‎11-07-2016

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hello

 

So I compiled the project through the VS2010 interface and wrote a batch file to copy files from the original portal src\Application folder to the Template folder. Installed the template folder to the correct location and created a new instance with the administration console. The new application is working, except certain images in the interface are not showing. For example the icons in the data grid (see attachment). I can't find the source of these images in the portal folders, so I don't know if I'm copying the correct folders over. The batch copy commands are below:

 

xcopy "C:\Program Files\Common Files\Hexagon\Services\Templates\Geospatial Portal\AdministratorFiles\*.*" "C:\MyTemplates\Flood Manual Map Portal\AdministratorFiles" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\AdminService\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\AdminService" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\App_Data\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\App_Data" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\App_GlobalResources\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\App_GlobalResources" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\App_LocalResources\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\App_LocalResources" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\App_Themes\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\App_Themes" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\bin\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\bin" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\img\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\img" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\js\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\js" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\licenses\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\licenses" /E /Y
xcopy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\xsl\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files\xsl" /E /Y
copy "C:\Users\Administrator\Desktop\portal-sdk-application-ep-portal-sdk-package\src\Application\*.*" "C:\MyTemplates\Flood Manual Map Portal\Files" 

 

 

Technical Evangelist
Posts: 1,118
Registered: ‎09-11-2015

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hi Brad,

 

I'm afraid that the files from the main project are not enough. If you check the content of the build.xml script, it also copies:

  • <LanguageFiles Include="$(MSBuildThisFileDirectory)..\lib\language-assemblies-main-zip\application-root\**\*.*" />
  • <AdministratorFiles Include="$(SourceTemplateFolder)\AdministratorFiles\**\*.*" />

Those icons are embedded in the resources, so it must be some DLL that is missing in your copied build.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Occasional Contributor
Posts: 18
Registered: ‎11-07-2016

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hi, I copied what seems to be the correct files to the template folder, created an instance with the new template and all the icons came in as expected. Now I moved the template files to a different server with GeoMedia Web Map Professional installed. No Visual Studio or special Geospatial Portal SDK installation, just the basic installation.

 

Added the template to C:\Program Files\Common Files\Hexagon\Services\Templates\ , modified the C:\inetpub\wwwroot\AdminConsole\App\WorkflowSettings\AdministrationConsole.xml file and restarted admin console service. Created a new instance in admin console using the new template. Now I get the following error in the admin console log file (any idea whats wrong?):

 

2017-09-25 11:06:09,789 [3] ERROR ErrorHandler [(null)] - The service encountered an unhandled exception
System.ArgumentException: Unknown installer command type
Parameter name: typeName
at Intergraph.AdministrationConsole.Service.Installer.AbstractInstallerCommandFactory.CreateInstallerCommand(String typeName, XmlReader configuration)
at Intergraph.AdministrationConsole.Service.Installer.AbstractInstallerCommandFactory.CreateInstallerCommand(XmlReader installerCommandXml)
at Intergraph.AdministrationConsole.Service.Installer.InstallerCommandProvider.GetInstallerCommands(String templateRepositoryPath, String nodeName)
at Intergraph.AdministrationConsole.Service.Installer.InstallerCommandProvider.GetInstallationCommands(String templateRepositoryPath)
at Intergraph.AdministrationConsole.Service.Nodes.Core.WebServiceNodeFactory.CreateNode(String name, INode parent, IDictionary`2 initializationValues)
at Intergraph.AdministrationConsole.Service.Nodes.Core.AbstractNodeFactory.CreateNode(Type type, String name, INode parent, IDictionary`2 initializationValues)
at Intergraph.AdministrationConsole.Service.Nodes.Core.ServicesNode.AddChild(INode node)
at Intergraph.AdministrationConsole.Service.AdministrationConsoleService.AddChild(String parentPath, Node node)
at SyncInvokeAddChild(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

Highlighted
Occasional Contributor
Posts: 18
Registered: ‎11-07-2016

Re: Geospatial Portal SDK MSBuild Script for Custom Template - Service Creation Failed

Hi

 

Fixed it. Had the wrong version of binary named Intergraph.AdministrationConsole.GeospatialPortal.GenerateMachineKeysCommand.dll

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.