c# - Unable to get attendance data of employees from biometric devices using cloud based windows services even if services is running correctly -


this small portion of window service code fetching real-time attendance data biometric device cloud. service working unable data device.this service taking data device , storing inside project folder making .log files.but when punched card on device nothing.i confusion on app.config files.there local host(127.0.0.1:8080) server in sdk of manufacturer got(but saying cloud based sdk).what should server list in case? please me.i totally new in websocketserver.

private void websocketserver_newmessagereceived(websocketsession session, string message) method used registering new devices not firing when punched card device.i not pasting codes here within method.

 using superwebsocket;  using supersocket.socketbase;          public class websocketloader     {         private static websocketserver websocketserver;          public static dictionary<string, string> _registereddevices;           private websocketloader(iworkitem server)         {             var wsserver = server websocketserver;             websocketserver = wsserver;         }         public static websocketsession getsessionbyid(string sn)         {             if (_registereddevices.containskey(sn))             {                 return  websocketserver.getappsessionbyid(_registereddevices[sn]);             }             else                 return null;         }          public static void setup(iworkitem server)         {             var websocketloader = new websocketloader(server);             websocketloader.addnewmessagereceived();             websocketloader.addnewsessionconnected();             websocketloader.addsessionclosed();             _registereddevices = new dictionary<string, string>();             _registereddevices.clear();         }         public void addnewmessagereceived()         {             websocketserver.newmessagereceived += new sessionhandler<websocketsession, string>(websocketserver_newmessagereceived);         }         public void addnewsessionconnected()         {             websocketserver.newsessionconnected += new sessionhandler<websocketsession>(websocketserver_newsessionconnected);         }          private void websocketserver_newsessionconnected(websocketsession session)         {             console.writeline(websocketserver.getallsessions().count());             loghelper.receive("newconnected[" + session.remoteendpoint + "]");         }          private void websocketserver_sessionclosed(websocketsession session, closereason reason)         {             loghelper.receive("closed[" + session.remoteendpoint + "],reason:" + reason);          }          private void websocketserver_newmessagereceived(websocketsession session, string message)         {             console.writeline(websocketserver.getallsessions().count());             loghelper.receive("messagereceived[" + session.remoteendpoint + "],message:" + message);         }     } 

app.config file contains following line <redisconfig writeserverlist="127.0.0.1:8080" readserverlist="127.0.0.1:8080" maxwritepoolsize="10000" maxreadpoolsize="10000" db="1" autostart="true" localcachetime="180" recordelog="false">

127.0.0.1 meant localhost. need update valid ip , port in biometric machine. if use ip & port code may work. make sure machine connected in same network.

in general, biometric machines can not associated static ip. hence, tcp/ip communication machines installed in remote location can not done through cloud application.

for cloud communication biometric machine, web api supported biometric machines can used.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -