Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

.NET Remoting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike9900 - 12 Dec 2005 15:50 GMT
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.
Signature

Mike

Nicholas Paldino [.NET/C# MVP] - 12 Dec 2005 15:54 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> We need to get the correct error message from the .NET Remoting server on
> the
[quoted text clipped - 12 lines]
>
> This error happens if the client is on a different machine.
Mike9900 - 12 Dec 2005 17:59 GMT
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?

Signature

Mike

> Mike,
>
[quoted text clipped - 22 lines]
> >
> > This error happens if the client is on a different machine.
Nicholas Paldino [.NET/C# MVP] - 12 Dec 2005 21:26 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> 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
[quoted text clipped - 37 lines]
>> >
>> > This error happens if the client is on a different machine.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.