Click here to Skip to main content
13,297,048 members (56,767 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


49 bookmarked
Posted 10 Jan 2009

Small and easy bug report system

, 16 Jan 2009
Rate this:
Please Sign up or sign in to vote.
A very small and easy C# + PHP bug report system.



A small bug tracking system, easy to implement and efficient.


The system uses a PHP file and a SQLite database on a remote server to read and write errors captured.

Using the Code

To send an error, you simply have to make a POST request to the file bugs.php, specifying the parameters "program", "error", and "text". For example, to send all the non captured Exceptions in a program, you could do something like this:

static void Main()

    Application.ThreadException +=
    AppDomain.CurrentDomain.UnhandledException +=
      new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

    Application.Run(new Form1());

static void Application_ThreadException(object sender,
            System.Threading.ThreadExceptionEventArgs e) {

static void CurrentDomain_UnhandledException(object sender,
                          UnhandledExceptionEventArgs e) {

static void SendException(Exception error) {
    System.Net.WebClient webclient = new System.Net.WebClient();
    System.Collections.Specialized.NameValueCollection postData =
               new System.Collections.Specialized.NameValueCollection(5);

    postData.Add("program", "Example version " +
    postData.Add("error", error.GetType().Name);
    postData.Add("text", error.ToString());

Uri(""), postData); }

To know the errors that have been sent, you can access them easily through any RSS reader, which allows viewing in a short time, and easily and conveniently. For example, if your PHP file is in, you can add that URL to your favorite feed reader to keep informed of the errors that occurs in your application.


Now you can set a password in the PHP file to prevent anyone can read the error log. Furthermore, it has functionality to delete individual records or the complete database.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Fco. Javier Marin
Spain Spain
I'm a young entrepreneur from Cartagena (Spain). I'm the creator and owner of some popular websites like Chuletas and Wikiteka.

Currently, I'm working on Ideatic, a company for Internet and software develop.

You may also be interested in...


Comments and Discussions

AnswerMessage Closed Pin
4-Sep-17 20:45
memberNancy Thomson4-Sep-17 20:45 
QuestionEnter - '\n' ? Pin
Mystery12313-Jan-09 21:30
memberMystery12313-Jan-09 21:30 
AnswerRe: Enter - '\n' ? Pin
Fco. Javier Marin14-Jan-09 0:59
memberFco. Javier Marin14-Jan-09 0:59 
GeneralRe: Enter - '\n' ? Pin
Mystery12314-Jan-09 2:13
memberMystery12314-Jan-09 2:13 
AnswerRe: Enter - '\n' ? Pin
Mario_F20-Jan-09 15:32
memberMario_F20-Jan-09 15:32

Mark Paint.
Education is the ability to listen to everything without losing your temper and self-confidence.

GeneralArticle Pin
Nedim Sabic12-Jan-09 0:55
memberNedim Sabic12-Jan-09 0:55 
GeneralRe: Article Pin
Fco. Javier Marin12-Jan-09 1:02
memberFco. Javier Marin12-Jan-09 1:02 
GeneralNo internet connection Pin
Johnny J.11-Jan-09 1:05
memberJohnny J.11-Jan-09 1:05 
GeneralRe: No internet connection Pin
Fco. Javier Marin11-Jan-09 1:10
memberFco. Javier Marin11-Jan-09 1:10 
QuestionWhy PHP? Pin
bobfox10-Jan-09 11:45
memberbobfox10-Jan-09 11:45 
AnswerRe: Why PHP? Pin
Fco. Javier Marin11-Jan-09 0:14
memberFco. Javier Marin11-Jan-09 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 16 Jan 2009
Article Copyright 2009 by Fco. Javier Marin
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid