Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

How to override DataPortalException (or is there a better way to do what we need)

$
0
0

Hello,

Our shop makes extensive use of CSLA.  We have written asp.net mvc, winforms, web services, etc all using CSLA.

One of the things that we are really struggling with is how to get back useful debugging information when an error occurs.  The thing that makes it complicated is that our a single application can pass through multiple application server "layers" to do what it needs.

For example, (and this is a real example), we have a winforms application that makes a call to a remote data portal.  Sometimes (ordering related), the data portal makes a call to a webservice on another machine.  The webservice makes another remote data portal call to a server inside our firewall. 

We have another scenario which is similar but in this case the UI is an asp.net mvc application and it hops to a diferent web service (REST based) but it calls the same final data portal as the above example.

My "holy grail" would be to get back object state and stacktrace information for ALL of the hops and log into a database somewhere.  The user  would just see a GUID or something that says (call tech support with this number) and we would be able to look it up and the log  would be have all of the information across all hops.

Right now we have to fire up a bunch of Visual Studio environments and point the data portal to production data to replicate the issues. 

I was thinking if we could override DataPortalException and add a GUID and then use implement IDataPortalExceptionInspector and change all of our configurations to call a custom exception that it would be the beginning of solving our problem.  But I am not able to get something like that to work so far (because the client side DataPortalException does not know how to deserialize the GUID property of the new exception type).  That was one of many errors I have encountered to try to get this to work.

Is there an easier way to do it?  Or am I on the right track?  I am not an engineer/architect so if you could give me an overview of the best solution that would be great.

We are testing this on the VERY NEWEST version of CSLA (4.5.601)  and .net 4.5.

Seth

 

 


Viewing all articles
Browse latest Browse all 764

Trending Articles