"Object set Connection Failed.. Object reference not set to an instance of an object" error?

Last post 04-06-2005, 1:57 PM by isaac. 4 replies.
Sort Posts: Previous Next
  •  04-06-2005, 11:36 AM 5374

    "Object set Connection Failed.. Object reference not set to an instance of an object" error?

    Hi,

    I've managed to successfully integrate with the cute chat application (v1) and have it working on a development machine. Today I have put the same app on another set of machines: one IIS 6 box and one SQL 2000 box. The code has been copied across and everything works except for the chat window. On the homepage of the application it goes and reads the available chat rooms, and this works - this tells me that the install of CuteChat within the application itself is working insofar as I can get a list of chatrooms etc. and the database connections are working. However, when I try to launch the chat client itself, I get this error:

    --------------------
    Connection Failed.. Object reference not set to an instance of an object.retry
    server side CuteChat.ConnectFailedException: CuteChat.ConnectFailedException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. Server stack trace: at Taecanet.Web.UI.Chat.ChatSqlDataProvider.ListUserUniqueName() Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at CuteChat.SqlServer.ISqlDataProvider.ListUserUniqueName() at CuteChat.SqlServer.SqlDataAccess.GetUserInternalId(String uniquename) Exception rethrown at [1]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at CuteChat.IDataAccess.GetUserInternalId(String uniquename) at CuteChat.ChatSystem.GetUserIdentity(String useruniquename) Exception rethrown at [2]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at CuteChat.ChatSystem.GetUserIdentity(String useruniquename) at CuteChat.ChatRaneService.get_CurrentUser() at CuteChat.ChatRaneService.Connect() --- End of inner exception stack trace --- at CuteChat.ChatRaneService.Connect()

    ----------------

    This implies that there is a problem with my implementation of the ListUserUniqueName method; here's the code:



            public override string [] ListUserUniqueName ()
            {
                _Dataset.ListUserUniqueName ();
                int nCount = 0;
                string [] UserList = new string [_Dataset.User.Rows.Count];
               
                foreach (Taecanet.Web.Data.Datasets.Chat.UserRow ur in _Dataset.User)
                {
                    UserList[nCount] = ur.ID;
                    nCount ++;
                }

                return UserList;
            }

    _Dataset is a class which inherits from a strongly typed database and adds methods, such as the ListUniqueUserName method. This goes off to the database and does a select * from the database's user table (my database, not the cutechat one).

    This code works absolutely fine on my local machine and on four other boxes. Why would I be getting the above error - I would guess it must be something in the configuration file, but then surely I wouldn't even be able to get a list of available rooms, which I can do on the home page?

    Many thanks

    Eyesy


  •  04-06-2005, 12:12 PM 5378 in reply to 5374

    Re: "Object set Connection Failed.. Object reference not set to an instance of an object" error?

  •  04-06-2005, 12:41 PM 5381 in reply to 5378

    Re: "Object set Connection Failed.. Object reference not set to an instance of an object" error?

    Hi,

    As I said at the top of my first email - v1.1.

    Thanks

    Isaac

  •  04-06-2005, 1:06 PM 5384 in reply to 5381

    Re: "Object set Connection Failed.. Object reference not set to an instance of an object" error?

    Isaac,
     
    If the code you wrote works fine on local machine, we can say maybe  the code is correct.
     
    Maybe you can find out the problem by checking your web.config file.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-06-2005, 1:57 PM 5391 in reply to 5384

    Re: "Object set Connection Failed.. Object reference not set to an instance of an object" error?

    I've traced the problem to the fact that I only have the debug version of the cutechat.dll and we are shipping release dlls for the rest our application; If I build our application in debug mode then the cutechat part works fine. So can we have a release version of the cutechat.dll to discount the possibility that the interaction between your debug assembly and our release ones is the problem.

    Thanks

    Eyesy

View as RSS news feed in XML