# WorkflowGenEngineService Error

**URL:** <https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197>\
**Category:** Installation\
**Created:** [October 27, 2018, 11:05pm UTC](https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197 "2018-10-27T23:05:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ParadimeWeb](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@ParadimeWeb](https://discuss.workflowgen.com/u/ParadimeWeb)\
**Post date:** [October 27, 2018, 11:05pm UTC](https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197/1 "2018-10-27T23:05:16Z")

</div>

I keep getting errors in the Event viewer. Every 3 minutes…

One thing to note is that my installation is on the root of the website. My “ApplicationUrl” is something like “[https://wfgen.mycompany.com](https://wfgen.mycompany.com)”

I also noticed that to start the service, I have to change the value of “ApplicationUrl” and add an ‘/’ at the end of the url like this: “[https://wfgen.mycompany.com/](https://wfgen.mycompany.com/)”. I have to change it back after because if I don’t, ADFS authentication throws and error.

Running the latest version 7.13.1.

```
<exception callerId="WorkflowGenEngineService"><source>mscorlib</source><message>Length cannot be less than zero.
Parameter name: length</message><type>System.ArgumentOutOfRangeException</type><stackTrace><![CDATA[ at System.String.Substring(Int32 startIndex, Int32 length)
   at Advantys.Workflow.Win.Services.EngineService.ServiceController.LoadConfiguration()
   at Advantys.Workflow.Win.Services.EngineService.CheckTimeLimitService.CheckTimeLimit(Object sender, ElapsedEventArgs e)]]></stackTrace><innerException></innerException></exception>
```

---

<div class="post-metadata">

**Author:** ![ParadimeWeb](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@ParadimeWeb](https://discuss.workflowgen.com/u/ParadimeWeb)\
**Post date:** [October 30, 2018, 12:43am UTC](https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197/2 "2018-10-30T00:43:47Z")

</div>

To expand on this topic, you get the same error when trying to start the service without the end ‘/’ in the ApplicationUrl and you also get this error:

> Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object.  
> at Advantys.Workflow.Win.Services.EngineService.CheckTimeLimitService.OnStart(String args)  
> at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

---

<div class="post-metadata">

**Author:** ![ParadimeWeb](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@ParadimeWeb](https://discuss.workflowgen.com/u/ParadimeWeb)\
**Post date:** [October 30, 2018, 10:47pm UTC](https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197/3 "2018-10-30T22:47:32Z")

</div>

Here is the issue with ADFS when adding the end ‘/’ in the ApplicationUrl

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/0b5cbebf0f792b12436b6c0b155298d3f5f0176e.png)

It looks like the redirect\_uri is malformed, add two ‘/’ after the applicationUrl, like this:

> [https://wfgen.company.com//auth/callback](https://wfgen.company.com//auth/callback)

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 31, 2018, 3:06am UTC](https://discuss.workflowgen.com/t/workflowgenengineservice-error/1197/4 "2018-10-31T03:06:31Z")

</div>

Hi Gabriel,

Please open a ticket in our Helpdesk site so we can investigate this issue.

Regards,  
Eddy.
