IIS Permissions for Dynamics AX workflow and All that

15 10 2009

Ok, here’s the scenario.

One sets up a workflow for a client, does comprehensive testing on their test environment and then take it to their live environment. You then go through a checklist of all the workflow hoops that you must hop through for the infrastructure to work correctly, setting up Business connector account, batch jobs, IIS website etc, then you wait to see if all works correctly when the client submits their first record (as you don’t want dirty data). Then you get the dreaded call that Workflow is not working and that somebody is getting many emails saying vaguely that workflow failed to communicate as desired. So today I wrote a small test workflow that enables one to run a record through from start to finish to see if all is well. If anyone is interested in getting hold of this just drop a comment or pop me an email. Its a really basic form with a single approval with everything setup, all thats left is to create a configuration.

However all of that aside, I have a client (running separate machine for IIS and AOS) that I didn’t do this to and got the call awhile later requesting support. Their event logs were displaying the following on the AOS machine

Exception thrown in     
SysWorkflowEventDispatcher-onAcknowledgeWorkflowActivation    
SysWorkflowEventDispatcher-raiseWorkflowActivationEvent        : 
Web service failed: workflow id WI000002AS Server was unable to process request. 
---> Access is denied

and the following on the IIS Machine:

An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1114387320/ROOT/MicrosoftDynamicsAXWorkflow50
Process ID: 4776

Exception: System.UnauthorizedAccessException

Message: Access to the port is denied.

StackTrace:    at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)
at Microsoft.SharePoint.Publishing.BlobCache.GetCacheTokenThreadStart()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

The underlying connection was closed: An unexpected error occurred on a receive.

We solved the error by adding the Business Connector user to the administrators group on the IIS Machine, and all came right. For the moment this is a temporary hack. Still investigating the precise permissions needed to get this to work with security properly in tact. Anyone have any ideas? I’ll keep you posted on progress. So far checkout technet for official requirements for business connector, apparently you only need IIS_WPG (IIS Worker Process Group) and “STS_WPG (STS Worker Process Group), if running Windows SharePoint Services”

Cheers!

Advertisements

Actions

Information

7 responses

9 03 2010
Francien

Hi,
Can you please send me the code of your test workflow?

Thanks
Francien

31 03 2011
Daniel

Hey i have the same problem, but i cant solve it by adding bcproxy to admn groups, what else can i try ?

8 04 2011
Jonathan

Hi Daniel. In my experience this has normally worked. You could also try and re-install the workflow after adding the user to the relevant access group.

9 05 2011
Daniel

Thanks. I will try that. Report here.

16 12 2011
Cleu

Hi can I have a copy of the test work flow too? Im having a hard time trying to make the sample workfile work. And I’am very new with this system so please have patience with me… thanks.

25 01 2012
Ole Richardt Nielsen

I would be interested in your workflow example, please

25 01 2012
Ole Richardt Nielsen

I have the same issue with no reaction from the IIS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: