Click here to Skip to main content
15,905,590 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: is it possible to sample my screen? Pin
Tino Fourie12-Jul-14 11:46
Tino Fourie12-Jul-14 11:46 
QuestionDetect when iOS or Android connected to PC Pin
Becky Alpha5-Jul-14 13:41
Becky Alpha5-Jul-14 13:41 
AnswerRe: Detect when iOS or Android connected to PC Pin
Eddy Vluggen7-Jul-14 7:15
professionalEddy Vluggen7-Jul-14 7:15 
AnswerRe: Detect when iOS or Android connected to PC Pin
jschell7-Jul-14 10:04
jschell7-Jul-14 10:04 
GeneralRe: Detect when iOS or Android connected to PC Pin
EYESTRA1N17-Jul-14 8:33
EYESTRA1N17-Jul-14 8:33 
GeneralAn unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Pin
ganeshmyname28-Jun-14 6:39
ganeshmyname28-Jun-14 6:39 
GeneralRe: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Pin
Dave Kreskowiak28-Jun-14 9:57
mveDave Kreskowiak28-Jun-14 9:57 
GeneralRe: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Pin
jinzai17-Jul-14 1:46
jinzai17-Jul-14 1:46 
Greetings.

I would like to see your code, too but -- I can offer you some help anyway.

Always use try/catch for network communications and db access and ignore anyone that tells you not to -- unless it is your boss, but even then -- you should use it. I am saying this -- not to chastise you or puff myself up -- I am saying it because if you do you will not only learn how to fix this yourself -- you will learn to write code that can handle issues and also it will perform better. Generally, I will wrap most all of a function in try/catch if it involves communications or database access. You do not need it everywhere, just in key areas that warrant it.

If you ignore it altogether -- your application will halt because you did not use try/catch-- not good for anyone and not good for you. If you use try/catch -- at least you know that an error occurred and at least the code can exit gracefully instead of spitting out that page that tells your users that your code just died on them.

You said -- continuously -- but, the exception seems to be telling a different story. I suspect that your buffer read is either missing data that is in the buffer, or you are not servicing it often enough or -- your buffer is too small to begin with. TCP has some built-in defense against many errors, but it cannot force you to service the socket properly, so -- it is the buffer, the socket properties or your read code. How large is the expected data?

Mostly, guessing buffer sizes is a bad idea -- either you get one too small or you waste resources by making it too large. This is not a career where guessing is a good strategy and asynchronous communications demands that we code properly and not make assumptions.
QuestionExchange 2010 - Out Of Office Rule Pin
Frosch1111123-Jun-14 4:39
Frosch1111123-Jun-14 4:39 
AnswerRe: Exchange 2010 - Out Of Office Rule Pin
Eddy Vluggen23-Jun-14 4:59
professionalEddy Vluggen23-Jun-14 4:59 
GeneralRe: Exchange 2010 - Out Of Office Rule Pin
Frosch1111123-Jun-14 9:02
Frosch1111123-Jun-14 9:02 
AnswerRe: Exchange 2010 - Out Of Office Rule Pin
Eddy Vluggen23-Jun-14 22:29
professionalEddy Vluggen23-Jun-14 22:29 
GeneralRe: Exchange 2010 - Out Of Office Rule Pin
Frosch1111124-Jun-14 21:08
Frosch1111124-Jun-14 21:08 
GeneralRe: Exchange 2010 - Out Of Office Rule Pin
Eddy Vluggen24-Jun-14 22:29
professionalEddy Vluggen24-Jun-14 22:29 
GeneralRe: Exchange 2010 - Out Of Office Rule Pin
Frosch1111124-Jun-14 22:53
Frosch1111124-Jun-14 22:53 
AnswerRe: Exchange 2010 - Out Of Office Rule Pin
Bernhard Hiller23-Jun-14 21:46
Bernhard Hiller23-Jun-14 21:46 
QuestionRunning Shared sub in new thread? Pin
Draco201321-Jun-14 6:11
Draco201321-Jun-14 6:11 
AnswerRe: Running Shared sub in new thread? Pin
Dave Kreskowiak21-Jun-14 6:47
mveDave Kreskowiak21-Jun-14 6:47 
General[Hiring] .Net Developer in NYC Pin
Victoria F19-Jun-14 10:32
Victoria F19-Jun-14 10:32 
GeneralRe: [Hiring] .Net Developer in NYC Pin
Dave Kreskowiak19-Jun-14 10:48
mveDave Kreskowiak19-Jun-14 10:48 
GeneralRe: [Hiring] .Net Developer in NYC Pin
Victoria F19-Jun-14 10:49
Victoria F19-Jun-14 10:49 
GeneralRe: [Hiring] .Net Developer in NYC Pin
Dave Kreskowiak19-Jun-14 10:51
mveDave Kreskowiak19-Jun-14 10:51 
GeneralRe: [Hiring] .Net Developer in NYC Pin
Victoria F19-Jun-14 10:53
Victoria F19-Jun-14 10:53 
GeneralRe: [Hiring] .Net Developer in NYC Pin
Eddy Vluggen20-Jun-14 0:32
professionalEddy Vluggen20-Jun-14 0:32 
Questionentity framework 6 don't resolve foreign key Pin
micheleroma16-Jun-14 22:31
micheleroma16-Jun-14 22:31 

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.