I have a TCP remote application that needs to throw custom exceptions to
client application.
My client application can't receive these custom exceptions when server
application is on a different machine. A "Server encountered an internal
error. For more information, turn on customErrors in the server's .config
file." exception is raised.
It works perfectly when both client and server applications are on same
machine.
I did some search on internet for this problem, and found that framework 1.1
needs to have CustomErrors parameter set to Off on server config file and
also custom exception classes need to be serializable. My classes are
already serializable and I have CustomErrors set to false but I still can't
serialize my exception to client application.
I'm alerady mad at this, cause I saw that these actions solved other people
problems and its not working for me. I'm starting to think it can be some
kind of environment issue.
Anyone here had this problem? How can I solve this?
Thanks in advance
Fernando
Fernando Cardoso - 29 Dec 2004 12:08 GMT
Just to complete, evaluating expression
System.Runtime.Remoting.RemotingConfiguration.CustomErrorsEnabled(false)
returns True while debugging server application. It would return False
because of my CustomErrors setting on app.config.
Fernando
> I have a TCP remote application that needs to throw custom exceptions to
> client application.
[quoted text clipped - 22 lines]
>
> Fernando
Fernando Cardoso - 29 Dec 2004 15:49 GMT
I found a solution! Look at this article:
http://dotnetjunkies.com/WebLog/chris.taylor/articles/5566.aspx
Changed CustomErrors property using reflection. It wasnt changing using
config file.
Fernando
> Just to complete, evaluating expression
> System.Runtime.Remoting.RemotingConfiguration.CustomErrorsEnabled(false)
[quoted text clipped - 32 lines]
> >
> > Fernando