Click here to Skip to main content
15,746,813 members

Comments by Member 14623639 (Top 23 by date)

Member 14623639 1-Feb-23 4:53am View    
How will this affect my goal?
Member 14623639 31-Jan-23 8:31am View    
Yes. I will try to use more thread and also will work on my database code. Thank you so much.
Member 14623639 31-Jan-23 3:38am View    
Yes you are right. After commenting out some code the sockets weren't disconnecting but I still don't get it as I understood that too many processes in the application are causing this but how do they lead sockets(async) to disconnect? Because this has never happened before and I'm curious to know what is it exactly happening causing this issue.
Member 14623639 31-Jan-23 2:38am View    
Are these some mistakes that are causing the socket to disconnect?
Member 14623639 20-Jan-23 3:40am View    
I tried using Encoding.UTF8.GetBytes() and Encoding.UTF8.GetString().

I tried
byte[] dataRead = File.ReadAllBytes(op.FileName);
byte[] data = Encoding.UTF8.GetBytes(Encoding.UTF8.GetString(dataRead));
to get the file into UTF8 and after writing it returns with corrupt file with invalid size
File.WriteAllBytes(filenameandpath, data);