Click here to Skip to main content
15,904,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to All,

I m facing a problem in an Application Server Project built in C#

This application receives data from TCP connection and make a file.

Meanwhile, this file is being interpreted and being processed further.

I am using TCPSERVER component. It works in a multi threaded environment. when any client conects, a separate thread is allocated and the further work is done by that thread.

Can anyone guide me , what would be the problem , or my approach is correct or not.

Thanks and Regards
Rajesh
Posted
Comments
Michel Godfroid 4-May-10 3:07am    
How does it shut down abnormally? Any error message, exceptions? what is the TCPSERVER component? Any links?
[no name] 4-May-10 3:38am    
Ya, provide some error message or exceptions. So that it is clearer to understand.
rick at abc 4-May-10 18:13pm    
Does the service even get past the OnStart method?

1 solution

If this is a single file that is being written to and read from you will most likely encounter thread synchronization issues since the file could be being written to while another thread is trying to read from it, or visa versa. Look in the ReaderWriterLock[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900