Error Message

Tagged:

Currently contains 8 posts

Avatar

July 01, 2019 20:48

hirenexus

I’m getting this error message when trying to use the API docs and it appears it’s not working on my staging site either.

{
“errors”: " at Microsoft.VisualBasic.ErrObject.Raise(Int32 Number, Object Source, Object Description, Object HelpFile, Object HelpContext)\r\n at CGI4VB.Check_Session_Timestamp(eSESSIONID_USAGE_TYPE sessionid_usage, eSESSION_VALIDATION_OPTIONS sessionValidation) in D:\\mst-agile-git\\Source\\CGI4VB\\CGI4VB.vb:line 5396\r\n at CGI4VB.LoadIni(String SessionIdentifier, Boolean plainTextDBId, eSESSION_VALIDATION_OPTIONS sessionValidation, eSESSIONID_USAGE_TYPE sessionid_usage, String username, Boolean idIsBase32, Boolean allowloadreginternal) in D:\\mst-agile-git\\Source\\CGI4VB\\CGI4VB.vb:line 3699\r\n at DataHandlerExtension.DAL.DataHandlerHelper.AuthorizeRequest(String SessionId, String LanguageCode, eSESSIONID_USAGE_TYPE sessionUsage, Boolean nosession, Boolean novalidate, Boolean base32) in D:\\mst-agile-git\\Source\\WebServices\\REST\\DataHandlerExtension\\DAL\\DataHandlerHelper.cs:line 351\r\n at PcrRestApi.App_Start.CustomMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in D:\\mst-agile-git\\Source\\WebServices\\REST\\PcrRestApi\\App_Start\\RequestHandler.cs:line 177"
}

The SessionId I’m using is this:

Avatar

July 01, 2019 20:55

Jarrid-PCRecruiter

I tried from my end and it’s showing that SessionId is not valid. It most likely timed out based on your database timeout settings. Can you try generating a new SessionId and re-running your request? In the future I would recommend not posting SessionId directly on the forum as someone else could just them to access your data if they were live.

Avatar

July 01, 2019 21:03

hirenexus

Thanks I removed it. Interesting, I’ll try a different session id and see if it changes.

Avatar

July 02, 2019 14:43

hirenexus

We have a couple apps that are using a static SessionId and they’re still working. Do we need to get a SessionId every time we make a call to the API?

Avatar

July 02, 2019 15:18

Jarrid-PCRecruiter

No, but I would refresh it every now and again (24-48 hours?) I am almost positive it’s based on the timeout for the database.

Avatar

July 02, 2019 16:24

hirenexus

Is this a recent change? We’ve used the same sessionId on one of our apps for like a year. Our database timeout is set to 1,000 hours so that wouldn’t have allowed us to use it that long…

Avatar

July 02, 2019 16:25

Jarrid-PCRecruiter

I don’t believe so

Avatar

August 14, 2019 03:35

amitdutt

ErrObject.Raise(Int32, Object, Object, Object, Object) Method
Definition
Namespace:
Microsoft.VisualBasic
Assemblies:
Microsoft.VisualBasic.dll, Microsoft.VisualBasic.Core.dll
Generates a run-time error; can be used instead of the Error statement.

C#

Copy
public void Raise (int Number, object Source = null, object Description = null, object HelpFile = null, object HelpContext = null);
Parameters
Number
Int32
Required. Long integer that identifies the nature of the error. Visual Basic errors are in the range 0-65535; the range 0-512 is reserved for system errors; the range 513-65535 is available for user-defined errors. When setting the Number property to your own error code in a class module, you add your error code number to the vbObjectError constant. For example, to generate the error number 513, assign vbObjectError + 513 to the Number property.

Source
Object
Optional. String expression naming the object or application that generated the error. When setting this property for an object, use the form project.class. If Source is not specified, the process ID of the current Visual Basic project is used.

Description
Object
Optional. String expression describing the error. If unspecified, the value in the Number property is examined. If it can be mapped to a Visual Basic run-time error code, the string that would be returned by the Error function is used as the Description property. If there is no Visual Basic error corresponding to the Number property, the “Application-defined or object-defined error” message is used.

HelpFile
Object
Optional. The fully qualified path to the Help file in which help on this error can be found. If unspecified, Visual Basic uses the fully qualified drive, path, and file name of the Visual Basic Help file.

HelpContext
Object
Optional. The context ID identifying a topic within HelpFile that provides help for the error. If omitted, the Visual Basic Help-file context ID for the error corresponding to the Number property is used, if it exists.

Reply to thread