GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 38
Registered: ‎12-03-2015

Workflow Standalone authorization configuration - GMSC 2016

[ Edited ]

Hi All,

How to configure an authorization for standalone workflows in GMSC 2016 basing on roles configured in GMSC admin console?

I could find no documentation nor instruction except this one:

 

https://community.hexagongeospatial.com/t5/Developer-Discussions/Standalone-workflow-authorisation-p...

 

Could you please  provide some instructions?

 

Regards

Piotr

Highlighted
Staff
Posts: 1,088
Registered: ‎10-18-2015

Re: Workflow Standalone authorization configuration - GMSC 2016

Hi Piotr,

 

this is possible, but it requires a custom implementation. Basically the idea is to implement something similar we have in GMSC administrator (admin itself is nothing but a workflow with additional components).

 

If you take a look at the admin web.config you will find a section like this:

 

 

  <system.web>

    <authentication mode="Forms">
      <forms loginUrl="~/ScAccount/Index" timeout="2880" />
    </authentication>

In the case of the Admin, there is a ScAccountController, which is used to display the login screen and login to. (As you can see the ScAccountController part of the loginUrl from the web.config).

 

 

What you need is to implement a custom controller and in particular the index method (to display the login screen) and the login method (implementing login).

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Regular Contributor
Posts: 193
Registered: ‎07-07-2016

Re: Workflow Standalone authorization configuration - GMSC 2016

[ Edited ]

Stefano, could You give as an example of ScAccountController content?

 

I'm trying to implement authorization on GMSC2020 standalone workflows.

So I've added to my Web.config section:

 

<authentication mode="Forms">
	  <forms loginUrl="~/Logon/Index" timeout="2880" />
    </authentication>
    <authorization>
      <deny users ="?" />
      <allow users = "*" />
    </authorization>

Then I've created gmsc extensions project in VisualStudio and I've added a controller:

 

 

public class LogonController : WorkflowController
    {
        public LogonController(IWorkflowControllerContext workflowControllerContext) : base(workflowControllerContext) { }

        [AllowAnonymous]
public override ActionResult Index() { return View(); } }

 

If I run my standalone application at url:

https://war-hsiv-nidg.ingrnet.com/StandaloneWorkflows/workflow?workflow=test

then it redirects me to Controller and the controller tries to show View, but the following error appears:

 

The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Logon/Index.aspx ~/Views/Logon/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx ~/Views/Logon/Index.cshtml ~/Views/Logon/Index.vbhtml ~/Views/Shared/Index.cshtml ~/Views/Shared/Index.vbhtml

 

I've created such aspx file but the problem still appears. What can be wrong?

gmsc_logowanie.png