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: 286
Registered: ‎02-09-2016

Configure ASP.NET state server for Geospatial Portal

Hi team,

 

One of our client is using load balancing for their production enviornment that have 3 machines. In order for geospatial portal to work correctly in load balancing configuration, we need to centralize all portal session data.

 

We start ASP.NET State Service. The portal web.config also has a section about session state setting, but our attempt to use that setting on one machine hasn' t been successful, the portal throws 500 error code when it launches 

 

 

webconfig sesstionstate 01.png

We also try to configure session state for the portal in IIS instead, it does launch but it looses all defined maps.

 

 

IIS.png

 

Appreciate all insights and suggestions on this matter.

 

Kind regards

 

 

    

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Bob,

 

Have you checked this topic?

https://hexagongeospatial.fluidtopics.net/reader/mTU~cgWbwQvAN0vZ2~kvMw/QV7B4c6TugcKwl4oh1urwQ

 

Thanks,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Jan,

 

Thank you for the reply. I have read the article, but it is still very vague to me and I haven't succeeded, would you mind showing a working configuration example ?

It would be great if I can simulate this on my local succesfully before trying on the real load balancer.

 

Kind regards,

 

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Bob,

 

Unfortunately I don't have personal experiences in this area but it sounds reasonable to me that this should work:

  • Define a single location for Portal user maps - it must be accessible from all nodes, perhaps use UNC path and make sure that the IIS service has R/W access to it.
    • This location has to be defined in each Portal application node's web.config, mapStorageFolder attribute to the webclient element configuration section. You must use path such as \\server\SharedMapFolder
  • Set up the session state server / service and make sure it is running and works.There should examples on the web on how to test this service. The simplest possible approach for me would be to create a very simple ASP.NET application, distribute it among the cluster nodes and check if the session values are peristed.
    • Reference this service from all of the cluster nodes when configuring Portals session management.

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Jan & team,

 

Thank again for looking at this problem. I found an issue with the instructions from the topics.

 

Firstly, it seems to assume that user maps are stored in the portal instance itself. However, from version 2015, the user maps are defined in Admin Portal  and they are stored at "C:\ProgramData\Hexagon\Geospatial Server\Admin Portal\Maps" and its location is stored in portal's configuration file. So, the path needs to be converted into UNC path; however, I have tried using UNC for the link but still haven't succeeded. 

 

p1.png

 

A way to get around that is placed the map content under the portal folder, then as the article mentions, use UNC path for mapStorageFolder parameter; however, it now shows problem initializing map service even though the map is so simple.

 

p2.png

 

 

 

 

Appreciate all suggestions and insights,

 

Kind regards,

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Bob,

 

Thanks for your suggestions, I will notify our documentation team abou the outdated instructions.

 

Regarding the Portal error - can you see any related error details in the Portal log file?

 

Thanks,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Contributor
Posts: 67
Registered: ‎07-07-2016

Re: Configure ASP.NET state server for Geospatial Portal

I had same problem using an instance of Geoportal 2015 version. This doesn't happen with an instance of version 2013.

Looking for differences I have found a workaround. It seems that administration console when written default workspace to app_data\configuration\configuration.xml write a extrange path to defaultWorkspaceId value with the unc path, then Geoportal complain when starting about invalid UNC url.  I have modified the configuration.xml manually and set defaultWorkspaceId only with ID and not the file specification with path. It seems that if you set only the ID then it looks for mapstoragefolder configured in web.config that accepts the unc path.

 

 

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

Re: Configure ASP.NET state server for Geospatial Portal

[ Edited ]

Also, the Portal configuration uses file URI to look for the file locations on the system, there for in case of UNC path, you should notation like this:

  • Network: \\192.168.10.20\c$\ProgramData\Hexagon\Geospatial Server\Admin Portal\Maps\mapGUID
  • URI: file://192.168.10.20/c$/ProgramData/Hexagon/Geospatial%20Server/Admin%20Portal/Maps/mapGUID
  • in configuration: file:\/\/192.168.10.20\/c$\/ProgramData\/Hexagon\/Geospatial%20Server\/Admin%20Portal\/Maps\/mapGUID

Another thing that you have to keep in mind is that if you create a network share, it is accessible only for the user who created it. Here comes a problem with UNC shared which might be tricky to set up for IIS_IUSRS / AppPool identity users. That is why I used a complete path with machine name (IP) in sample above.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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

Re: Configure ASP.NET state server for Geospatial Portal

Hi Jan & team,

 

I have tried your suggestions but it now shows me error "the starting workspace does not exist". I have tried quite a number of configurations but it hasn't work properly. Wonder whether there is other underlying configurations.

 

Kind regards, 

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

Re: Configure ASP.NET state server for Geospatial Portal

[ Edited ]

Disclaimer: Bob already created a support ticket which forced me to actually spend few hours on this Robot Happy This is the current outcome:

 

  1. Create a shared folder with proper read permissions. For the tests I just set Everyone to have R/W access to it. Each cluster node should have R/W access to it. Please refer to ShareFolder.png. I've actually created two folders, one for Portal maps that are used by regular users and other one just for the AdminPortal. I copied all existing subfolders from their original locations to this folder (ShareFolder2.png).
  2. Unfortunately Portal cannot read file URI if shared server_name/folder format is used, like:
    "defaultWorkspaceId": "file://192.168.56.103/SharedStorage/AdminMaps#f5368b92-a984-4c40-9821-cf7d3ae664a1"
    • from: "defaultWorkspaceId": "file://192.168.56.103/SharedStorage/AdminMaps#f5368b92-a984-4c40-9821-cf7d3ae664a1"
    • to: "defaultWorkspaceId": "f5368b92-a984-4c40-9821-cf7d3ae664a1" (i.e. use only the ID)
    • This is likely a bug
    • A workaround is to copy the created AdminPortal maps and workspaces to the normal Portal user's shared folder (in my case from ..\AdminMaps to ..\Maps). And, in each Portal over all cluster nodes, change defaultWorkspaceId in the App_Data\Configuration\configuration:
    • This is actually reflecting the hint that Josep mentioned above (thanks!!). Don't forget to change each Portal's web.config parameter mapStorageFolder to something like "\\192.168.56.103\SharedStorage\Maps".
  3. Another bug or limitation - when using ASP.NET State Server, the internal OpenStreetMap class library cannot be serialized (probably just missing [Serializable] attribute in the source code) which makes it impossible to use. A workaround is to use different background data provider such as Bing or Google - both work fine in my tests.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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