cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Access Denied when pushing config to Kepware

aiGreek
7-Bedrock

Access Denied when pushing config to Kepware

Hello, I'm trying to write a service that allows me to push a Kepware configuration (in .json format) to a chosen Kepware server.


When I try to push the configuration using the "PushConfigToEdge" built in service, I get "Configuration Transfer from ThingWorx Platform failed. | Reason = 'Access Denied'" on the Kepware interface. I've also tried using the built in push/pull interface from the Thing -> Configuration Files page, but I get the same result.

What am I doing wrong? Below you can find the source code I'm using at the moment.

Thanks in advance.

 

 

 

 

var fileNameExt = fileName + ".json";

var tempString = jsonString;
tempString = "'" + jsonString + "'";
tempString = JSON.stringify(tempString);

pause(10000);

var tempObj = JSON.parse(tempString);

pause(10000);

 Things["SystemRepository"].SaveText({
	path: '/' + fileNameExt /* STRING */,
	content: tempObj /* STRING */
});

Things[gatewayName].PushConfigToEdge({
	sourceFileName: fileNameExt /* STRING */,
	filePassword: undefined /* STRING */,
	sourcePath: '/' /* STRING */
});

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
anarwal
12-Amethyst
(To:aiGreek)

hi @aiGreek ,Configuration Utility needs to be closed before this function will work properly from TW.

View solution in original post

2 REPLIES 2
anarwal
12-Amethyst
(To:aiGreek)

hi @aiGreek ,Configuration Utility needs to be closed before this function will work properly from TW.

aiGreek
7-Bedrock
(To:anarwal)

Thank you @anarwal, I would have never figured that out by myself! Now I'll need to add some form of logging since I can't check the results via the config utility, but that's another matter.

Top Tags