Ask a questionAsk a question
 

Answer.NET remoting error

  • Tuesday, October 13, 2009 4:22 PMxlthim Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a console server program running on vehicles that capture GPS data. I have a map on clients that make an RPC call to the vehicle, and the server returns the data in an xml formated string. This has been working for over a year now.
    I am developing another program to call the very same method in the server. All I did was copy and paste the connection/getXML() part of the mapping code (WHICH WORKS!). This program is giving me a typical MS non-English error that I can't figure out.....  
    System.Runtime.Remoting.RemotingException: Server encountered an internal error.  <some BS about custom errors>
    Server Stack Trace
    Exception rethrown at [0]:
      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage rtnMsg)
      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
      at myProgram.GetXML()

    If I change to a bogus path, it returns a connection time-out, so I know I'm hitting my server program. The getXML() is in a try/catch so if there was a problem in the code, I would see the exception on the console - NONE. I have the map running while running this program. Map works fine. My server displays on the console that the map is calling the xml data, but never tells me that my new program is calling.. I have verified all my references and all my usings.
    It almost looks like I'm calling a function that doesn't exist, but I have verified all my spelling and cases.
    My problem is: String xml = obj.GetXML(); Just like the mapping code (WHICH WORKS!)
    HELP!

Answers

  • Thursday, October 29, 2009 1:10 PMxlthim Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I'm not running IIS.

    This post was moved from another area where I posted the answer.

    The remote object (server) is already up and running. The object on the client is up and running.
    My problem ended up being that the object class on my client had a different namespace than the object class on the server. When I changed the client namespace to match the server and adjusted the references, it started working.

    My unhandled exception was, my client was making an RPC call into the server looking for a specific object. Namespaces being different, it couldn't find the object it was looking for.
    • Marked As Answer byxlthim Thursday, October 29, 2009 1:10 PM
    •  

All Replies

  • Thursday, October 29, 2009 9:31 AMRoman.Ivanashko Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    As far as I understand your remote object with the getXML() is hosted in the IIS? And when you try to call it from a client you get the "Message" error. It looks like .net runtime can't "start" your remote object on the server for some reasons. It would be helpful to see what actually server retuns in the response (use some sniffer). Try to check windows event log on the server. It may be a security, missing reference or whatever else issue.
  • Thursday, October 29, 2009 1:10 PMxlthim Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I'm not running IIS.

    This post was moved from another area where I posted the answer.

    The remote object (server) is already up and running. The object on the client is up and running.
    My problem ended up being that the object class on my client had a different namespace than the object class on the server. When I changed the client namespace to match the server and adjusted the references, it started working.

    My unhandled exception was, my client was making an RPC call into the server looking for a specific object. Namespaces being different, it couldn't find the object it was looking for.
    • Marked As Answer byxlthim Thursday, October 29, 2009 1:10 PM
    •