@anosingh As per documentation, you need to ping server every 30 sec to keep connection alive. Check if you are sending "ping" using timer. Also which API are you talking about ? I recently successfully ran WebSocket 2.0 for C#.
Posts made by JarvisBull
-
RE: Web socket streamingposted in General Discussion
-
RE: please share some example of WebSocket 2.0 response dataposted in C#/.Net SDK
@Jaydip-Garala vshinde480@gmail.com please send through email if possible.
-
RE: unable to generate session on .net console appposted in C#/.Net SDK
@Bhagawansahay You need to use updated AngelOne DLL with totp addition.
-
RE: please share some example of WebSocket 2.0 response dataposted in C#/.Net SDK
@Jaydip-Garala Hi Please share working code to connect Webocket 2.0 .
-
RE: Concurrent Websocket 2.0 connection in not doneposted in C#/.Net SDK
@Vikas_shah1008 Can you post working code to connect to Websocket 2.0 & subscribe / unsubscribe feed ?
-
RE: Explore the Smart API WebSocket 2.0 User Guide (Depth 20) - Beta Testingposted in General Discussion
@admin Why there is no SDK support for c#?
-
c# TOTP Loging Error New DLL with updated Generate Session methodposted in C#/.Net SDK
-
Download angelone solution file from sdk.
-
Edit below code . I have added totp part for post request.
-
Build solution & use generated DLL from this.

-
Since Generate session method is updated now, we can pass TOTP parameter.
-
To generate TOPT ,
-
Install Otp.Net package from Nuget packages.

-
Once it is installed, use below function to generate TOTP
Public Shared Function GetTotp() As String
Dim secretKey = OtpNet.Base32Encoding.ToBytes("JSPCTWENRTFATEQXFE227P7ADI")
Dim totp = New Totp(secretKey)
Dim otp = totp.ComputeTotp()
Return otp
End Function -
Aboce code is in vb.net. If required convert it to c# using online converters.
-
Use above function to generate TOTP.
e.g.
Dim totp as string
totp = GetTotp()
Use above lines of code before calling Generatesession method.
- Finally , it will pass post data to url & you will be able to login successfully.
-
-
RE: Totp generated in c# using Google authenticator but failedposted in C#/.Net SDK
@venu How to pass tOTP to Generatesession method ? I am unable to login
-
RE: errorcode: AB1004. Something Went Wrong, Please Try After Sometimeposted in C#/.Net SDK
@Swetha Pass mPin insteed of password. Also please let me know how did you modify Generate session method ?