.NET Remoting

G

Guest

We need to get the correct error message from the .NET Remoting server on the
another computer.

When we use .NET Remoting the client does not receive correct SQL Server
error message if the client is on the another computer. For example, if the
client deleted a record in SQL Server and the SQL Server throw and exception,
the exeption message is not sent to the client as the correct SQL Server
message, instead the exception is either System.Net.Sockets.SocketException
or System.Runtime.Remoting.RemotingException which must be the correct SQL
Server exeption.

This error happens if the client is on a different machine.
 
N

Nicholas Paldino [.NET/C# MVP]

Mike,

You need to check the InnerException, which will typically hold the
original exception that caused the remoting exception. If you get something
besides a RemotingException, then that indicates that there is a problem in
the remoting infrastructure, as opposed to an exception thrown by the method
that was called.

Hope this helps.
 
G

Guest

Thanks for the answer. I am not sure if this helps, but why do we need to
check for the inner exception if it is on another computer. Why does it work
correctly for the client on the same computer?

Isn't it possible to change the configuration to work?

--
Mike


Nicholas Paldino said:
Mike,

You need to check the InnerException, which will typically hold the
original exception that caused the remoting exception. If you get something
besides a RemotingException, then that indicates that there is a problem in
the remoting infrastructure, as opposed to an exception thrown by the method
that was called.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mike9900 said:
We need to get the correct error message from the .NET Remoting server on
the
another computer.

When we use .NET Remoting the client does not receive correct SQL Server
error message if the client is on the another computer. For example, if
the
client deleted a record in SQL Server and the SQL Server throw and
exception,
the exeption message is not sent to the client as the correct SQL Server
message, instead the exception is either
System.Net.Sockets.SocketException
or System.Runtime.Remoting.RemotingException which must be the correct SQL
Server exeption.

This error happens if the client is on a different machine.
 
N

Nicholas Paldino [.NET/C# MVP]

Mike,

It is working. The reason it works like this is because there is a
whole other layer of indirection when you use remoting. You are dealing
with the serialization of the call stack, as well as sockets and whatnot,
each of which can throw any of the same exceptions that you might throw in
your actual method implementation. Because of this, you need some way of
differentiating between what your method threw, and a problem with the
remoting framework. The RemotingException is the way happens.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Mike9900 said:
Thanks for the answer. I am not sure if this helps, but why do we need to
check for the inner exception if it is on another computer. Why does it
work
correctly for the client on the same computer?

Isn't it possible to change the configuration to work?

--
Mike


Nicholas Paldino said:
Mike,

You need to check the InnerException, which will typically hold the
original exception that caused the remoting exception. If you get
something
besides a RemotingException, then that indicates that there is a problem
in
the remoting infrastructure, as opposed to an exception thrown by the
method
that was called.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mike9900 said:
We need to get the correct error message from the .NET Remoting server
on
the
another computer.

When we use .NET Remoting the client does not receive correct SQL
Server
error message if the client is on the another computer. For example,
if
the
client deleted a record in SQL Server and the SQL Server throw and
exception,
the exeption message is not sent to the client as the correct SQL
Server
message, instead the exception is either
System.Net.Sockets.SocketException
or System.Runtime.Remoting.RemotingException which must be the correct
SQL
Server exeption.

This error happens if the client is on a different machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top