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 
Super Contributor
Posts: 301
Registered: ‎02-09-2016
Accepted Solution

Create custom redirect for authenticated users for Geospatial Portal

[ Edited ]

Hi team,


We have a client using geospatial portal and it requires users to be authenticated. The Portal is configured to use window authentication and depends on the domain the user will be redirected to one of the two pages Full.aspx or MapWithRibbon.aspx. We develop a Redirect page and it does the job. It is added as default document in web.config. However, when configuring the instance, in the Layouts tab, the starting layout could not be displayed. It shows the error as follows.


2018-03-12 11_33_01-WinServer2012R2Base00_P2018E (Before installing P2018) [Running] - Oracle VM Vir.png


And the nothing useful from the log file. If we take the Redirect page out of the default document setting and use one of the layouts, the problem goes away. However, we do need the Redirect page as the default document. 


I suspect that we may need to create the Redirect page correctly which needs to implement IConfigurableForm or override the Default.aspx.

2018-03-12 15_31_20-AzureGISVM - - Remote Desktop Connection.png


Appreciate all suggestions and ideas. I also attach the code the Redirect page.


Kind regards,

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

Re: Create custom redirect for authenticated users for Geospatial Portal

Hi Bob,


I assume this is standard Portal (non-SDK), correct?


What actually happens, if the user allowed to see only MapWithRibbon.aspx tries to put Full.aspx into the URL? I think it will load, making this solution a bit vulnerable.


Since the code is pretty simple, I believe it would be more secure to apply it directly in Full.aspx and not use any redirection page. A limitation is that you're using pre-compiled page in a non-SDK Portal. Thus there's no .CS file to modify. Fortunately you can still override the default loading mechanisms by using an inline code in the ASPX file, something like:

<script runat="server"> protected override void OnInit(EventArgs e) { base.OnInit(e);
// put your redirection code here } </script>
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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

Re: Create custom redirect for authenticated users for Geospatial Portal

Hi Jan,


Thank you for the suggestions. I totally forgot I could try that. Thank you again. Smiley LOL



Kind regards,