Skip to main content

I'm trying to turn on the Workflow REST API. I turn it on then press Apply Changes and get the error below. I am in the Security Administrator role. Any advice much appreciated!

tia

===================================

 

Could not refresh services, try again?

<!DOCTYPE html>
<html>
<head>
<title>The resource cannot be found.</title>
<meta name="viewport" content="width=device-width" />
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
@media screen and (max-width: 639px) {
pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
}
@media screen and (max-width: 479px) {
pre { width: 280px; }
}
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/Api/Workflow/V1' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>The resource cannot be found.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
<br><br>

<b> Requested URL: </b>/api/workflow/v1/op/refresh<br><br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0

</font>

</body>
</html>
<!--
"HttpException]
at System.Web.CachedPathData.GetPhysicalPath(VirtualPath virtualPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.HttpContext.GetFilePathData()
at System.Web.Configuration.RuntimeConfig.GetConfig(HttpContext context)
at System.Web.Configuration.CustomErrorsSection.GetSettings(HttpContext context, Boolean canThrow)
at System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute)
at System.Web.HttpContext.ReportRuntimeErrorIfExists(RequestNotificationStatus& status)
-->

 

 

Hi,


 


Can you start a network trace from your browser's developer tool, then click on Apply Changes again. Look for the following request URL:


 


https://{k2 site url}/api/odata/op/refresh


 


Is that URL shown in the network trace correct? Normally it should be your K2 site URL, but if your environment is not configured correctly, the URL shown may be wrong.


 


Hi Richo,


 


Have you tried to refresh it using the SMartobject services tester ? Does it give you the same results ?


 


Should you feel that this post is of use and or an accurate solution to the raised question, I kindly encourage you to mark it as such
using the 'Mark as Solution', 'Kudo' andor ‘Me Too’ options.


 


Cheers,
Kate


 


K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.


Hi there @Richo 


 


I had a look at the error you provided and found the following:


 


The entire error message you see there is actually a html page. Just copy everything within and including the <html>...</html>, paste it into notepad/notepad++, then save it as something like error.html. Then open error.html. You should see a well-formed IIS error message.


 


I did that for you and I have attached a well-formed IIS error massage.


According to me the Request url should be something simmillar to :https://[servername]/api/workflow/v1/op/refresh


 


let me know if this helps towards solving your problem!


 


Regards 


HulisaniN



I know you suggested a trace but I'm not really setup to do that - i.e. don't know how!

 

Here's what happens in my DEV environment when I put the URL below into the browser (it works fine):

Same thing happens when I use the URL you suggested below.

 

Not sure if that is helpful.

 

 

 


Hello  @Richo ,


Sounds to me that something is wrong with the setup or current configuration. A K2 Repair might be needed. Apply latest FixPack on your environmen


 


If the K2 Service account is separate from the K2 Application Pool Account (i.e. DENALLIXK2Service and DENALLIXK2WebService); the K2 Application Pool account will also need to be a part of the 'API Administrators'


 


This means that you need add K2 Service account in K2 Application Pool account, that should resolve the issue as well. Below is how to do it.


 


Open IIS Manager and locate to Application Pools


Look for K2, K2 smartforms and K2_net4


Right click to each of these and choose 'Advanced Settings'


Look fo 'Identity' and click on the right column ellipsis 


Add the K2 Service account


may be this:



https://community.nintex.com/t5/How-To/quot-Could-not-refresh-services-try-again-quot-error-on-REST-API/ta-p/124348


Reply