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

  • Home
  • SEARCH
  • 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 8787399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:52:58+00:00 2026-06-13T21:52:58+00:00

I’m playing around with XSockets.NET, and I’ve spent way too much time debugging what

  • 0

I’m playing around with XSockets.NET, and I’ve spent way too much time debugging what should be a simple problem. I’m using the standard templates that come with XSockets, which create a project called XSockets.DevServer, and a class within that project called DebugInstance. When I host this DebugInstance class within my web project, all seems to work as expected. However, when I try to host it within the XSockets.Debug.Console project, or when I try to get it to run on my production IIS instance, I get a NullReferenceException in the code below:

    [ImportOne(typeof(IXBaseServerContainer))]
    public IXBaseServerContainer wss { get; set; }

    public DebugInstance()
    {
        try
        {
            Debug.AutoFlush = true;
            this.ComposeMe();

            // NullReferenceException on the next line - wss apparently never gets set.
            wss.OnServersStarted += wss_OnServersStarted;
            wss.OnServerClientConnection += wss_OnServerClientConnection;
            wss.OnServerClientDisconnection += wss_OnServerClientDisconnection;
            wss.OnError += wss_OnError;
            wss.OnIncommingTextData += wss_OnIncommingTextData;
            wss.OnOutgoingText += wss_OnOutgoingText;
            wss.OnServersStopped += wss_OnServersStopped;
            wss.StartServers();
        }
        catch (Exception ex)
        {
            Debug.WriteLine("Exception while starting server: " + ex);
            Debug.WriteLine("Press enter to quit");
        }
    }

Clearly the problem is happening within this.ComposeMe(), but there’s no troubleshooting information, and since XSockets isn’t apparently open-sourced, I haven’t been able to step through the code to figure out where the problem is.

EDIT: To be clear, I know what a NullReferenceException is. In this case its immediate cause is the fact that wss is null. What I want to know is its proximate cause, i.e., why ComposeMe() doesn’t assign it, even though that’s what it’s apparently supposed to be doing. Apparently the homegrown IOC that XSockets is using to support its plugin architecture is supposed to find an instance of IXBaseServerContainer, but it’s apparently not – and I have no idea why. And not having the source, I’m not even sure what the candidates for IXBaseServerContainer are.

EDIT 2012-11-06: Here’s what the appSettings element of my app.config looks like:

<appSettings>
  <add key="XSocketServerStartport" value="4502"/>
  <add key="UsePolicyServer" value="true"/>
  <add key="XSockets.PluginCatalog" value="XSockets\XSocketServerPlugins\"/>
  <add key="XSockets.PluginFilter" value="*.dll"/>
  <add key="XMessageInterceptorsEnabled" value="false"/>
  <add key="XErrorInterceptorsEnabled" value="false"/>
  <add key="XConnectionInterceptorsEnabled" value="false"/>
  <add key="XHandshakeInterceptorsEnabled" value="false"/>
  <add key="XSocketLogPath" value="XSockets\XSocketServerPlugins\Log"/>
  <add key="XBufferSize" value="8192"/>
</appSettings>

I’ve got all the files mentioned below in both my $(ProjectDir)\XSockets\XSocketServerPlugins\ and my $(TargetDir)\XSockets\XSocketServerPlugins\ folders, e.g.:

10/29/2012  09:53 AM            15,872 XSockets.Core.Communication.dll
10/29/2012  09:53 AM            70,656 XSockets.Core.dll
10/29/2012  09:53 AM             8,192 XSockets.DevelopmentServer.dll
10/29/2012  09:53 AM            11,776 XSockets.Extensibility.Handlers.dll
10/29/2012  09:53 AM            10,240 XSockets.Extensibility.Interceptors.dll
10/29/2012  09:53 AM            23,040 XSockets.External.dll
10/29/2012  09:53 AM            24,064 XSockets.Protocol.dll
10/29/2012  09:53 AM            39,424 XSockets.Server.dll
11/05/2012  05:37 PM            12,288 XSockets.WebRTC.Prototype.Shared.Handlers.dll

Any thoughts?

  • 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-13T21:52:59+00:00Added an answer on June 13, 2026 at 9:52 pm

    Ken,

    When the plugin framework of XSockets.NET dont find any “plugins” there is nothing to Compose. I think the reason of this is that you don’t have the “plugins” deployed in the IIS Production instance of yours?

    You will need to add the following elements to your appSettings section of the config file(web.config)

    <add key="XSockets.PluginCatalog" value="XSockets\XSocketServerPlugns\" />
    <add key="XSockets.PluginFilter" value="*.dll" />
    

    In “my case” i have the XSockets.NET plugins (protocols, handlers/controllers) inside the

    /XSockets/XSocketServerPlugns folder in my Website.

    you should have the following plugins ( .dll’s) in that folder

    1. XSockets.Core.Communication
    2. XSockets.Core
    3. XSockets.Extensibility.Handlers
    4. XSockets.Extensibility.Interceptors
    5. Xsockets.External
    6. XSockets.Protocol
    7. XSockets.Server
    8. XSockets.DevelopmentServer **

    ** This is the project/class library that contains the server of yours. ( i.e the DebugInstance)

    If you want to configure the server , you will need to create a configuration loader class see this url for info http://xsockets.net/api/net-c/creating-custom-configuration-plugin , or just shoot an email to contact@xsockets.net and we will help you out.

    If you need further assistance, just let me know.

    Kind regards

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.