Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Propagating .NET remoting exception back to the remoting client

Propagating .NET remoting exception back to the remoting client

Scheduled Pinned Locked Moved ASP.NET
helpcsharpsysadmindebuggingquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Talal Sultan
    wrote on last edited by
    #1

    Hello people, I have a system with a windows application, a web service and a remoting application (on another machine.) The windows application calls the web service to execute some task. The web service references an assembly that will establish contact with the remoting server to execute the task. Everything works fine but if an exception is thrown by the remoting server, I am not able to propagate it back to the remoting client (web service.) The error is: Server encountered an internal error. For more information, turn on customErrors in the server's .config file. Does "server" here mean the web service or the remoting server? I have added the following lines at the end of the web.config of the web service:

    <system.runtime.remoting>>
    <debug loadTypes="true" />
    <customErrors mode="off" />
    </system.runtime.remoting>

    I tried both "on" and "off" for the customErrors but nothing works. To test this issue, I have deliberately sent corrupted data to the remoting server in order to get an exception. I am using .NET 1.1. In the remoting object method (the one that is called from the web service) I placed a try-catch and displayed the exception in the console (the remoting server is a console app) and I also rethrew a new application exception back. The console writes the correct exception message but it seems that the throw doesn't propagate back the exception message. I can always get around the problem by adding a flag property and an exception message property in the remoting object. I would then catch the exception in the remoting object, set the flag to false and the message to the exception message and return. Back on the web service, I would test if the flag is false and continue from there. I would prefer to be able to propagate the exception in a clean manner so if anyone has any clue, I would appreciate it. Thanks, Talal

    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups