Unable to add node with the same nodeId of a deleted node

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
alberto.piovan
Full Member
Full Member
Posts: 5
Joined: 16 Mar 2017, 15:47

Unable to add node with the same nodeId of a deleted node

Post by alberto.piovan »

Hi,
I am using .NET SDK 3.0.0 with .NET Framework 4.7.2.
In my server application I have successfully removed an object node using the relative method of the node manager

Code: Select all

DeleteNode(RequestContext context, NodeId nodeId, bool deleteTargetReferences)


If then I try to add a new object with the same NodeId of the previously removed node using:

Code: Select all

CreateObject(RequestContext context, CreateObjectSettings settings)
an exception is thrown because the requested NodeId already exists.

Have I to do other operations before adding the new node?

Thank you,
Alberto Piovan

sudhapc
Hero Member
Hero Member
Posts: 28
Joined: 16 Oct 2018, 12:47

Re: Unable to add node with the same nodeId of a deleted node

Post by sudhapc »

Hi ,

i am also facing the same issue did you find any solution ?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Unable to add node with the same nodeId of a deleted node

Post by Support Team »

Hello,

we assume that the delete operation was not completed properly. Please check the returned StatusCode of the DeleteNode() function for more information.
Best regards
Unified Automation Support Team

sudhapc
Hero Member
Hero Member
Posts: 28
Joined: 16 Oct 2018, 12:47

Re: Unable to add node with the same nodeId of a deleted node

Post by sudhapc »

Thank you.
posting my solution for reference.
it was throwing baduseraccessdenied status code
enabling the access by overriding hasaccesstodeletenode in node manager solved the issue

Post Reply