Posts

Showing posts with the label Security

Disbale JIT in .net / Application level Exception handling in .net

Image
Download Code Example I was developing windows application for a well known company of World. This application was in C#.net 2005. As per requirement I have to show user defined message whenever an Exception occurs in the application. The answer is very simply write a simple Try{},Catch{} statement to handle exception. Suppose I have a code of 1000 line unwanted code and error handling creates extra thread while executing the application. I had search on the internet and found a solution to disable the JIT debugger. It works but still it is showing the application information related to functions etc. used in the code. Now, a major issue had risen from client, i.e. he don’t want to show JIT information to user he wants to show his own message whenever any Exception occurs. Offf…. Now that’s the task to which needs to done. I cannot use Try{},Catch{} as this decrease the application performance. Finally I came to the solution. I had wired an event with application to handle applicatio...

How to make Human Verification Code or Image Verification Code in c#.net

Now, on many sites we can see image verification or human verification codes. By entering the verification code shown on the web page when a user sign up, the web site or application can prevent automated registrations. This reduces system loads and ensures better performance and security of web site or application. This tutorial will show you how to create the randomly generated verification code in ASP.NET 2.0 and C#. Now, questions arises how to make these code. Now, time to say thanks to .net who had given a wonderfull library with the name of System.Drawing. Before stating any thing import System.Drawing. Copy this code: Using System.Drawing; In order to create a random verification code, we create a method called CreateRandomCode at first public string CreateRandomCode(int codeCount) { string allChar = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; string[] allCharArray = allChar.Split(','); string randomC...