This project has moved and is read-only. For the latest updates, please go here.

System.InvalidOperationException when using NLog with TCP


Following ErrorMessage (Exception in MessageBox) occurs when using NLOG in TCP-Mode:
"There are no context policies.
FirstChanceException raised in DefaultDomain : Message -- The operation is not allowed on non-connected sockets. :: innerException -- :: TargetSite -- GetStream :: StackTrace -- at System.Net.Sockets.TcpClient.Getstream() :: HelpLink --"

Why trying TCP?
I have tried to use UDP, but somehow messages are lost even when communicating on localhost only.


yarseyah wrote Mar 1 at 1:28 PM

I'm tempted to say it might be related to the issue you're having with UDP. Under tests (and demonstrated by the test programs in the source-control), using UDP I have had 1000's of messages a second come through without a single drop-out.

What is your machine (OS, vintage, etc)?

Last resort, someone had a similar error message 23-Jun-2015 and claimed "Uninstalled again and deleted the whole \AppData\Roaming\Sentinel folder then reinstalled seems to work OK again... "

schweinsbauch wrote Mar 6 at 8:25 AM

UDP is working better after deleting \AppData\Roaming\Sentinel, i have no idea why.

TCP is still not working, it shows the same error as described above.

OS is Windows 7 x64, .net 4.6.2., i5-6600, 16 GB Ram etc.