Showing posts with label bugs. Show all posts
Showing posts with label bugs. Show all posts

Saturday, March 31, 2012

There are so many bugs in the template of "Time Track"

There are so many bugs in the template of "Time Track", an error occured while I want to try delete a project in the project list page.

Error meesage as follows:

Server Error in '/Sample' Application.

Item has already been added. Key in dictionary: 'Id' Key being added: 'Id'

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.ArgumentException: Item has already been added. Key in dictionary: 'Id' Key being added: 'Id'

Source Error:

Line 44: Protected Sub ListAllProjects_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles ListAllProjects.RowDeletingLine 45:Line 46: e.Keys.Add("Id", ListAllProjects.Rows(e.RowIndex).Cells(0).Text)Line 47: Line 48: End Sub


Source File:c:\inetpub\wwwroot\Sample\TimeTracker\Project_List.aspx.vb Line:46

Stack Trace:

[ArgumentException: Item has already been added. Key in dictionary: 'Id' Key being added: 'Id'] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2836739 System.Collections.Hashtable.Add(Object key, Object value) +11 System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value) +49 Project_List_aspx.ListAllProjects_RowDeleting(Object sender, GridViewDeleteEventArgs e) in c:\inetpub\wwwroot\Sample\TimeTracker\Project_List.aspx.vb:46 System.Web.UI.WebControls.GridView.OnRowDeleting(GridViewDeleteEventArgs e) +133 System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +604 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +1155 System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +199 System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

When you add a item to a HashTable you can't have the same key, in your case all items that will be added to your Hashtable will have the "Id" as a key, make sure the key value is unique.
I knew the database constraint. I just want to say the "Time Tracker" has many bugs. Because I have not change anything in the project list page and database object.

Thursday, March 22, 2012

Thread being aborted error message.

Having recently been asked to look into some bugs in one of our old
web systems, I keep getting an error message in some try...catch
statements that I've put in.
Error message is
Thread was being aborted
This is raised whenever a Response.Redirect was called."jediknight" <wakthar@.gmail.com> wrote in message
news:1186149498.280646.177860@.b79g2000hse.googlegroups.com...

> Having recently been asked to look into some bugs in one of our old
> web systems, I keep getting an error message in some try...catch
> statements that I've put in.
> Error message is
> Thread was being aborted
> This is raised whenever a Response.Redirect was called.
http://msdn2.microsoft.com/en-us/library/a8wa7sdt(vs.80).aspx
Mark Rae
ASP.NET MVP
http://www.markrae.net
this is normal, you can eat it.
Lit
"jediknight" <wakthar@.gmail.com> wrote in message
news:1186149498.280646.177860@.b79g2000hse.googlegroups.com...
> Having recently been asked to look into some bugs in one of our old
> web systems, I keep getting an error message in some try...catch
> statements that I've put in.
> Error message is
> Thread was being aborted
> This is raised whenever a Response.Redirect was called.
>
> this is normal, you can eat it.
you mean swallow right?
Regards,
Alvin Bruney
---
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Lit" <sql_agentman@.hotmail.com> wrote in message
news:OsRGFAf1HHA.5992@.TK2MSFTNGP02.phx.gbl...
> this is normal, you can eat it.
> Lit
>
> "jediknight" <wakthar@.gmail.com> wrote in message
> news:1186149498.280646.177860@.b79g2000hse.googlegroups.com...
>

Thread being aborted error message.

Having recently been asked to look into some bugs in one of our old
web systems, I keep getting an error message in some try...catch
statements that I've put in.
Error message is

Thread was being aborted

This is raised whenever a Response.Redirect was called."jediknight" <wakthar@.gmail.comwrote in message
news:1186149498.280646.177860@.b79g2000hse.googlegr oups.com...

Quote:

Originally Posted by

Having recently been asked to look into some bugs in one of our old
web systems, I keep getting an error message in some try...catch
statements that I've put in.
Error message is
>
Thread was being aborted
>
This is raised whenever a Response.Redirect was called.


http://msdn2.microsoft.com/en-us/li...sdt(vs.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
this is normal, you can eat it.

Lit

"jediknight" <wakthar@.gmail.comwrote in message
news:1186149498.280646.177860@.b79g2000hse.googlegr oups.com...

Quote:

Originally Posted by

Having recently been asked to look into some bugs in one of our old
web systems, I keep getting an error message in some try...catch
statements that I've put in.
Error message is
>
Thread was being aborted
>
This is raised whenever a Response.Redirect was called.
>


this is normal, you can eat it.
you mean swallow right?

--
Regards,
Alvin Bruney
----------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley

"Lit" <sql_agentman@.hotmail.comwrote in message
news:OsRGFAf1HHA.5992@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

this is normal, you can eat it.
>
Lit
>
>
"jediknight" <wakthar@.gmail.comwrote in message
news:1186149498.280646.177860@.b79g2000hse.googlegr oups.com...

Quote:

Originally Posted by

>Having recently been asked to look into some bugs in one of our old
>web systems, I keep getting an error message in some try...catch
>statements that I've put in.
>Error message is
>>
>Thread was being aborted
>>
>This is raised whenever a Response.Redirect was called.
>>


>
>

Tuesday, March 13, 2012

Thread Safety?

i have an asp.net application which almost all of its methods are static methods.
is it prone for bugs and thread collisions or something?

No. There is nothing like that a static function is prone to bugs or collisions. Firstly, static member functions cannot access non-static members directly. A class member declared with the keywordstatic is a static member. A static member is owned by the class, not by its instances (objects of the class).
Note that static members are actually class members, while non-static members are instance members (means they are owned by the instances). Both in C# & VB.NET, we may create static/shared events, properties, fields and functions.

Due to the independent nature of static functions, it wont be affected by other threads at all.

HTH

Cheers

Vishal Khanna

(pls mark as answer if reply helps)