Skip to main content


 

Symptoms

 


Attempted to perform an unauthorized operation.
 

 

Diagnoses

 


After re-configuring the K2Services/WCF.svc to using HTTPS with the 'basicHttpBinding", the following piece of code in a custom web application:

processInstance = processNavigationServiceClient.StartNewProcessInstance(processInstance, false, false, false, false, false)

errors with:
Attempted to perform an unauthorized operation.

 

 

Resolution 

 The necessary configurations was made in the web.config file for the "K2Services" child web application as well the web.config file for the custom web application (that is calling the K2Services/WCF.svc) to resolve the issue. The custom web application uses ASP.Net Impersonation to pass the current user's credentials accessing the custom web application to the K2Services/WCF.svc for the StartNewProcessInstance call. This will show up in the custom web application's web.config as:

<identity impersonate="true"/>
 
Some relevant configuration values includes:
- "Authentication" mode for the custom web application as well as the "K2Services" child web application
- the application pool for the custom web application as well as the "K2Services" child web application
- the "Providers" available if using Windows Authentication for both web applications
- the options, "Transport/Message/TransportWithMessageCredential" for both web applications
- the options, "Basic/Certificate/Digest/None/Ntlm/Windows" for both web applications

Please see documentation below for more information:
http://help.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm_configure_ssl.html
https://help.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm_start_a_workflow_using_wcf_service.html

Additional information:
https://msdn.microsoft.com/en-us/library/ff649309.aspx
https://msdn.microsoft.com/en-us/library/ff649264.aspx

 

 



 

Hi,

 

I am getting the exactly same error when I am calling a normal "http" URL to do the same thing. 

 

I have tried diff options, I can see my identity being impersonated from client web application to the k2service cchecked in IIS logs], but still throws an exception with the message "Attempted to perform an unauthorized operation.". I checked k2 workspace, I do have right on the workflow I am trying to create as well.

 

 

Do you maybe remember what specific changes you made to get this working?


Reply