c# - How to host a bot server on a hosting service? -


i made simple bot application c# console application interacts users via http requests. want publish on host service online.
steps wanted take export of bot server's class class library , make asp.net application , upload host service (maybe plesk panel) , let asp.net make instance of server class , start it.

problem is, every time open browser , make request asp.net application dispatch new thread me thread pool everytime make new instance of server class , start it. how can access same server class?
is possible?
i know can buy vps , run console application there isn't wasting resources simple bot server application? sorry if question not clear.

you it's not recommended way it.

create class has getobj() returns running object, if there no object creates 1 , returns it.

see: https://en.wikipedia.org/wiki/singleton_pattern

have object make thread runs in background. have thread save it's variables sql server redundancy.

when create object first time. read variables sql server recreate state thread before killed.

in global.asax can initiate thread when application restarted.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -