BadSessionNotActivated,0x80270000,The session cannot be used because ActivateSession has not been called. |OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
BadSessionNotActivated,0x80270000,The session cannot be used because ActivateSession has not been called.
Avatar
Avdoot Kiran Chalke
New Member
Members
Forum Posts: 2
Member Since:
11/02/2017
sp_UserOfflineSmall Offline
1
06/28/2018 - 04:11
sp_Permalink sp_Print

Hello,

I get an error "BadSessionNotActivated" after sending ActivateSessionRequest. What I have understood from Part4 is that in order to activate the session, I need to send the session id and authentication token in ActivateSessionRequest received from CreateSessionResponse. Can any one tell me how can I pass the session id? Below is the message format of ActivateSessionRequest:

const RequestHeader session_reqHeader :=
{
authenticationToken := {
mask := 5,
namespaceUriBit := 0,
serverIndexBit := 0,
reservedBit1 := 0,
reservedBit2 := 0,
IdType := {
byteString := {
nameSpace := 0,
nodeValue := {
realByteString := {
lengthValue := 16,
byteStringValue := { 158, 90, 162, 148, 156, 246, 241, 148, 31, 193, 28, 209, 38, 236, 97, 192}
}
}
}
}
},
timestamp := 131556452505810000,
requestHandle := 5,
returnDiagnostics := 0,
auditEntryId := {
realString := {
stringLength := 0,
stringValue := ""
}
},
timeoutHint := 0,
additionalHeader := {
typeId := {
node := {
mask := 0,
namespaceUriBit := 0,
serverIndexBit := 0,
reservedBit1 := 0,
reservedBit2 := 0,
IdType := {
twoByte := {
nodeValue := 0
}
}
},
namespaceUri := omit,
serverIndex := omit
},
Value := 0
}
}

requestHeader := session_reqHeader,

clientSignature := { algorithm := { nullString := { arrayLength := -2147483647 } }, Signature := { nullByteString := { arrayLength := -2147483647 } } },

clientSoftwareCertificates := { realArray := { arrayLength := 0, arrayValues := { } } },

localeIds := valueof(tr_ListOfLocaleId({})),

userIdentityToken := {
encodingByte := 1,
twoByteNodeValue := omit,
namespaceIndex := 0,
fourByteNodeValue := 321,
encoding := 1,
parameterLength := 13,
extensibleParameterBody := {
anonymousIdentityToken := {
policyId := valueof(tr_String( "anonymous"))
}
}
},

userTokenSignature := {
algorithm := valueof(tr_StringNull),
Signature := valueof(tr_ByteStringNull)
}
}

 Any feedback given will be helpful. Thank You in advance.

With Regards,

Avdoot Chalke

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 109
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
06/28/2018 - 11:06
sp_Permalink sp_Print

Avdoot,

  The OPC Foundation has a public GitHub that includes stacks, sample/examples, including multiple languages (https://github.com/opcfoundation).  Also the forum on GitHub is a better place to ask implementation questions. 

Most people use one of the existing Stacks, which handle constructing the wire messages.  Also many developers use a SDK, which provides even more of the functionality required for the communications.  The SDK allows a implementer to focus on the information model or actual application instead of the communication aspects.

Paul 

Paul Hunkar - DSInteroperability

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Dev Opc
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1362
Posts: 4617