Thomas
Thomas

Reputation: 34208

How to handle Errors or Exception in middle tier structured way in .Net

Suppose that when we develop a webservice or a remoting layer as the middle tier - how could I handle an exception in a very structured way, such that the exception message can be captured from its calling environment?

Also, how can errors or exceptions be handled in structured way in the case of a class library, i.e., when we develop our dll file as a class library?

Please guide me in detail and, if it would be possible, post some short code for better visualization.

Thanks.

Upvotes: 0

Views: 441

Answers (1)

Chris B. Behrens
Chris B. Behrens

Reputation: 6295

I strongly recommend looking at the Microsoft Enterprise Library's Exception Handling block: http://msdn.microsoft.com/en-us/library/ff664698%28v=PandP.50%29.aspx. You can find extensive samples (here, for example), and a decently sized community of developers who are familiar with it.

HTH.

Upvotes: 1

Related Questions