Click here to Skip to main content
16,005,343 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enumerations Pin
Matt Gerrans27-Jul-05 8:34
Matt Gerrans27-Jul-05 8:34 
GeneralRe: Enumerations Pin
MarkMokris27-Jul-05 8:29
MarkMokris27-Jul-05 8:29 
GeneralRe: Enumerations Pin
Libor Tinka27-Jul-05 8:40
Libor Tinka27-Jul-05 8:40 
GeneralStatic Panel and the IDE Pin
Peter Vertes27-Jul-05 8:10
Peter Vertes27-Jul-05 8:10 
GeneralRe: Static Panel and the IDE Pin
Libor Tinka27-Jul-05 8:53
Libor Tinka27-Jul-05 8:53 
Generaldisabling windows keys Pin
Sam 200627-Jul-05 7:38
Sam 200627-Jul-05 7:38 
GeneralRe: disabling windows keys Pin
Peter Vertes27-Jul-05 8:15
Peter Vertes27-Jul-05 8:15 
GeneralAsynchronous socket problems in windows service Pin
daniilzol27-Jul-05 7:04
daniilzol27-Jul-05 7:04 
Hi,

We've wrote an app that utilizes asynchronous sockets to collect real-time information and write it into the database. We are using a slightly modified version of this example: http://www.codeproject.com/csharp/socketsincs.asp for our socket component.

Our app works fine, we've been testing it for a week and a half now and it performs almost flawlessly. The problem is that we also need a windows service version of the app, we've completed the windows service a week ago but for some reason it won't work. I've tracked it down and it turns out the BeginConnect call does not work. It just won't connect to the server and therefore no socket is created.

m_sock.Blocking = false;
AsyncCallback _connect = new AsyncCallback(ConnectServer);
m_sock.BeginConnect( epServer, _connect, m_sock );

ConnectServer should return IAsyncResult ar from which we can derive a socket, however it does not work. BeginConnect call fails and service simply fails to establish a connection.

Now with the exception of couple of lines specific to the app, the code in the app and in the service is absolutely identical, yet the app works absolutely fine and the service does not. We have no idea what is wrong with the service, why it won't establish connection. We've tried running the service under the domain administrator account thinking it was security issue, but it still won't work.



Anyone has any idea what's wrong here? I'm at a complete loss, been searching google for several days now to no avail.
GeneralRe: Asynchronous socket problems in windows service Pin
Roman Rodov27-Jul-05 19:15
Roman Rodov27-Jul-05 19:15 
GeneralRe: Asynchronous socket problems in windows service Pin
daniilzol28-Jul-05 6:01
daniilzol28-Jul-05 6:01 
GeneralRowFilter Pin
zaboboa27-Jul-05 6:14
zaboboa27-Jul-05 6:14 
GeneralRe: RowFilter Pin
pedrito6827-Jul-05 6:37
pedrito6827-Jul-05 6:37 
GeneralRe: RowFilter Pin
zaboboa27-Jul-05 7:45
zaboboa27-Jul-05 7:45 
GeneralRe: RowFilter Pin
boodi_8128-Jul-05 3:42
boodi_8128-Jul-05 3:42 
GeneralHttpWebRequest Pin
Neel0727-Jul-05 5:50
Neel0727-Jul-05 5:50 
GeneralRowFilter question. Pin
zaboboa27-Jul-05 5:30
zaboboa27-Jul-05 5:30 
Generalcircular dependencies Pin
ppp00127-Jul-05 4:48
ppp00127-Jul-05 4:48 
GeneralRe: circular dependencies Pin
Member 146675427-Jul-05 5:11
Member 146675427-Jul-05 5:11 
GeneralRe: circular dependencies Pin
pedrito6827-Jul-05 6:31
pedrito6827-Jul-05 6:31 
GeneralRe: circular dependencies Pin
Alomgir Miah27-Jul-05 6:47
Alomgir Miah27-Jul-05 6:47 
QuestionReading Version# from Setup? Pin
Ariadne27-Jul-05 4:45
Ariadne27-Jul-05 4:45 
AnswerRe: Reading Version# from Setup? Pin
mav.northwind27-Jul-05 19:58
mav.northwind27-Jul-05 19:58 
GeneralRe: Reading Version# from Setup? Pin
Ariadne27-Jul-05 20:07
Ariadne27-Jul-05 20:07 
GeneralRe: Reading Version# from Setup? Pin
mav.northwind28-Jul-05 20:10
mav.northwind28-Jul-05 20:10 
GeneralRe: Reading Version# from Setup? Pin
Ariadne28-Jul-05 20:40
Ariadne28-Jul-05 20:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.