AG8001 Invalid Token


  • Re: AG8001

    I have developed code in C# dotnet for connecting to SmartAPI Websocket version 2. The code always works well as long as it is a console app. However, it starts giving me AG8001 Invalid Token error after enabling windows forms in the App. The error occurs randomly. The same windows app may not give the error next day.
    I tried all tricks. I save the tokens in text file after generating them and read them on next login. It works well in console app. If the token is expired, I can generate new token any number of times in console.
    However, on the same laptop when I copy/paste the exact same code in another C# app, it behaves erratic. Console application on the laptop runs properly but the same code copied into another app on the same laptop starts giving AG8001 error.
    I am frustrated with this behavior of Angel. Moreover, there is no information from server which can help to debug the error.