WYSIWYG

http://kufli.blogspot.com
http://github.com/karthik20522

Friday, September 28, 2012

Handling Unhandled Exception Asp.NET MVC

Well, having unhandled exception is bad in the first place but displaying user a default IIS broken exception page or the yellow broken code page is even worse. Not a good user experience. But as all code/software there is always bugs and all ways a edge case that breaks unexpectedly. These unhandled expections can be handled in controller level in Asp.NET MVC. Following is a code snipped of handling errors and routing the user to a more user friendly error page.



In the above code, once the error is handled it's redirected to an Error Page. A user friendly error page such as this from clipthetrip.com

Labels: , ,

Saturday, September 1, 2012

Beer in my belly - IX


Acbc dizzy

Harviestoun bitter


Marooned on hog



liefmans goudenband

Labels:

Amazon SES (Simple Email Service) - Code

SES (simple email service) provided by Amazon is sleek easy to use email service. Unfortunately as always, anything new has limited documentation or overly complicated documentation. Following is a ready to use simple code snippet for using Amazon SES written in CSharp

Note: Amazon SDK needs to be installed or AWSSDK.dll need to be referenced. Download AWS SDK here So where can I find the “awsAccessKey” (Access key id) and “awsSecretKey” (Secret Key). Well, first login into AWS portal and then head over to Security Credentials page.



In the Security Credentials page look for Access Credentials section and you should have your Access Key Id and your Secret key.

Labels: , ,