Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8109739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:30:53+00:00 2026-06-06T01:30:53+00:00

I use SocketIO4Net for connecting to Socket.IO with C#, but when I try to

  • 0

I use SocketIO4Net for connecting to Socket.IO with C#, but when I try to emit an object to clients, my C# application suddenly gets closed (I have an MVC3 project)

I read Event Viewer and there’s 3 errors:

1)

A Webhost unhandled exception occurred.
 Sender Information: System.AppDomain/26995560
 Exception: System.Runtime.FatalException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.

2)

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/2/ROOT

Process ID: 3696

Exception: System.Runtime.FatalException

Message: Object reference not set to an instance of an object.

3)

Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.FatalException
Stack:
   at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

What’s wrong with my project? Is there any bug in SocketIO4NET?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:30:58+00:00Added an answer on June 6, 2026 at 1:30 am

    Finally I found answer, this is because the version of .NET (I use .NET 4) and the WCF duplexChannel.

    You should add this attribute on the top of WCF wrapper class:

    [CallbackBehavior(UseSynchronizationContext=false)]
    

    Thanks to Cauldwell.net for the answer: http://www.cauldwell.net/patrick/blog/CategoryView,category,CodeGen.aspx

    From cauldwell.net:

    The problem, it turned out, was that ASP.NET uses (by default) a
    little thing called the SynchronizationContext. As near as I can tell
    (I haven’t researched this thoroughly, to be honest) one of it’s jobs
    it to make sure that any callbacks get run on the UI thread, thereby
    obviating the need to call Control.Invoke like you do in WinForms. In
    my case, that additional lock was giving something fits, and it was
    trying to clean stuff up on a thread that wasn’t around any more,
    hence to NullReferenceException.

    Special thanks to James

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use scenario is pretty simple: I have a desktop only application that could be
Use case: we have some project meta-data files which we want tracked, but are
I use .hide to hide html contents bysliding left. but i have a doubt
Use Elixir and have two entities -- Voter and Candidate -- with many to
use javascript or other method ? have any recommendation?
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
Use case is to have a server connect to thousands of users email accounts
use case example I have a servlet that is receiving login requests. If a
Use case: 3rd party application wants to programatically monitor a text file being generated
use PHP and MySQL. Want my website to have the feature of image uploading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.