Hexagon Geospatial
MENU

Support WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Super Contributor
Posts: 279
Registered: ‎02-09-2016
Accepted Solution

Error in consuming PrintService in Portal

Hi team,

 

We deployed portal 2016 for our client and we configure portal instance to run with https protocol. We set up the portal to use the external print service. The experiment shows that the PrintService still needs to be configured to run with http. However, when consuming the print service in portal, it shows the following error.

 

2017-09-05 17_11_06-My Desktop - Desktop Viewer.png

 

We also try consuming the print service with the portal running under normal http, or use hostname instead of the full qualified name for the print service but it still shows the same error message. 

 

The Web site holds portal instances and print service do allow two bindings.

 

Binding.png

 

I suspect it is likely to be enviornmental issue but haven't figured out where it is.

 

Appreciate all ideas and insights

 

Kind regards,

Super Contributor
Posts: 279
Registered: ‎02-09-2016

Re: Error in consuming PrintService in Portal

Hi team,

 

Here is some update on investigating the issue. For some reason, there is a missmatched message type between portal and print service. When setting up the print service in portal, the portal send message in "application/soap+xml" format while the print service expect "text/xml" format. 

 

printing error.png

 

I include the portal log file here in case it's helpful.

 

I haven't found the cause why there is a missmatch. The portal and print service are out of the box.

 

Appreciate all suggestions and ideas on this issue.

 

Kind regards,

Staff
Posts: 340
Registered: ‎11-12-2015

Re: Error in consuming PrintService in Portal

Hi Bob,

 

It is possible there is mismatch here with HTTP and HTTPS. It should be investigated if the 'loadBalancingConfiguration' switch for printing will help this case. Despite the name it is not only specific to load balancing as it can be useful in SSL offloading cases and may be the configuration necessary here.

 

To trial please engage in the Portal instance web.config the ‘loadBalancingConfiguration’ for printing. Below is an example of it implemented.

 

Need to save the file and refresh all caches, .NET temp files and restart services to test properly.

 

    <!--

    Configuration for printing service:

    * tileSize - positive number switches WMS layers at print time to "Tiled" mode with given tile size; default value is 2000; 0 switches WMS layers to "View" mode with buffer = 1;

    * mapSizeLimit - maximum resolution of the generated image; default value is 5000;

    * timeout - default value is 00:02;

    * defaultService - (Local/FirstExternal) service type setted as default in printing window; default is FirstExternal;

    * precisionGeographic - precision of coordinates in geographic CRS; default value is 7;

    * precisionProjected - precision of coordinates in projected CRS; default value is 0;

    * printingEngine - (internalInternetExplorer/phantomJS) browser engine used in printing process; default value is internalInternetExplorer;

    * phantomJSProgramLocation - location of phantom program (used if printingEngine is phantomJS);

    * userName - name of user for Basic Authentication (used if printingEngine is phantomJS and Windows Authentication is enabled);

    * password - user password;

    * enablePhantomVerboseLogger - (true/false) enable creation of additional log files for phantom engine; default value is false;

    * loadBalancingConfiguration - (true/false) enable configuration for load balancing; default value is false;

    * hideDpi - (true/false) hides DPI visibility in Template Options (OGC DPI is used); default value is false;

    -->

    <!--

    <printing tileSize="2000" mapSizeLimit="5000" timeout="00:02" defaultService="FirstExternal" precisionGeographic="7" precisionProjected="0" printingEngine="internalInternetExplorer" phantomJSProgramLocation="C:\Program Files\Hexagon\Geospatial Portal\Program\PhantomJS\phantomjs.exe" loadBalancingConfiguration=”true” />

    -->

Super Contributor
Posts: 279
Registered: ‎02-09-2016

Re: Error in consuming PrintService in Portal

HI Stephen,

 

I am testing the printing service on dev, so there is no load balancing implemented. However, I will try the configuration that you suggested.

 

Kind regards,

Super Contributor
Posts: 279
Registered: ‎02-09-2016

Re: Error in consuming PrintService in Portal

Hi team,

 

From my online search, message type application/soap+xml is SOAP1.2 which wsHttpBinding uses and basicHttpBinding uses SOAP 1.1 (text/xml). The portal web.config has a section on basicHttpBinding for printing and print service also provide endpoint with basicHttpBinding, so technically there should be no missmatched in communicating message between these two.

 

portal printing binding.png

 

print service binding.png

 

We test the portal when it runs under HTTPS and HTTP but they still show the same error. This error is very confusing, and honestly I have no idea where I need to look.

 

Appreciate all suggestions and insights

 

Kind regards,

 

 

 

Technical Evangelist
Posts: 822
Registered: ‎09-11-2015

Re: Error in consuming PrintService in Portal

[ Edited ]

Hi Bob,

 

This happened to me after switching to ASP.NET Session State service instead of the original In Process mode. I don't know how to figure this out yet, I assume it might be either a limitation. Can you confirm that you use ASP.NET Session State service too?

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Super Contributor
Posts: 279
Registered: ‎02-09-2016

Re: Error in consuming PrintService in Portal

Hi Jan, Stephen and team,

 

Thank you for looking into this issue. The ASP.NET Session state service is not running on the environment I tested. This is very bizarre. I will do more research on this.

 

Kind regards, 

 

 

Highlighted
Super Contributor
Posts: 279
Registered: ‎02-09-2016

Re: Error in consuming PrintService in Portal

[ Edited ]

Hi team,

 

I finally resolved the issue. The problem is when print service gets consumed by a portal instance, in the process, it generates a verion file that have endpoint for PortalPrintService_v2.svc and not enough permission prevents it. The missed match I found it also happens when the print service well connects to the portal because the portal uses wsHttpBinding to connect print service basicHttpBinding (I already de-compiled the dll and check), this error message really derails my investigation.

 

Kind regards,

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.