trying to find out exact exception

Posted by Dipu710646 under C# on 2/14/2011 | Points: 10 | Views : 2525 | Status : [Member] | Replies : 13
Hi all,

Is there any way to identify each and every exception separately.? I want to show my custom error message depending on specific error.

Any reply is appreciated.

It is very urgent

Thanks,
Dipankar




Responses

Posted by: T.saravanan on: 2/14/2011 [Member] [MVP] Silver | Points: 25
Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

In which project you are going to make use ofit? can u brief your project so that we can guide for a better logging mechanism...

Thanks
Karthik
www.f5Debug.net

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dipu710646 on: 2/14/2011 [Member] Starter | Points: 25

Up
0
Down

HI All,

I have a windows application that will be installed in many machines. All will access same database located in a centralised location.

I want exclusive access for this access database(.mdb). How will I identify specific exception for exclusive access.

Thanks,
Dipankar

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/14/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Check these links

http://www.tek-tips.com/faqs.cfm?fid=172
http://www.applecore99.com/gen/gen015.asp



Thanks and Regards
Madhu

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/14/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
You can see that my Inner Exception String.

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Get the IP address of each server, and take the unique identity and write you own code logic using the enterprise library

Thanks
Karthik
www.f5Debug.net

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/14/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
@Karthik,

You mean each server or each client buddy??

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
At the server level, you can cant track the identity for the user... so you need to do it in the client level

Thanks
Karthik
www.f5Debug.net

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/14/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
ya...bt i think by mistake u wrote server ip :D

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
OOPS sorry... it shld be the client ip address...

Thanks
Karthik
www.f5Debug.net

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/14/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hehehe...that's what I was wondering :)

Nyways...got ur point buddy.

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/14/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
:) sure

Thanks
Karthik
www.f5Debug.net

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Tripati.patro on: 2/18/2011 [Member] Starter | Points: 25

Up
0
Down
The approach for logging each exception can be:

1) Create a common method for handling exception.
2) Throughout the application Catch block use the method and - pass the exception (if required other details) as an input to the common method.
3) From the common error handling method you can log the error in either database or flat file.
4) And to know about user information client IP or client user name can be tracked and logged.

For logging exception Enterprise Library logging mechanism can be used. (FlatFileListner, TraceListner)

B.Tripati Patro
Oracle Certified Associate

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response