BugTracker.Net : Add attachment gives you invlaid id

By mahingupta on Feb 25 2010 | 0 Comments

Hi, We are using BugTracker.net to Track Bugs ;)

It has fairly almost all features one need to track issues related to development and above all its free. Highly recommended after using it for almost 1 year.

We were facing a strange bug in it from quite a few time.

Whenever we try to add attachment to issue, it always failed with message “invalid id”.

After a bit of Google, we found following solution here :

In add_attachment.aspx. file remove attribute action=add_attachment.aspx from the form tag.

ie

Change :

<form class=frm runat="server" enctype="multipart/form-data" action=add_attachment.aspx  >

To :

<form class=frm runat="server" enctype="multipart/form-data" >

 

Happy Bug Tracking :)

Post info

Tags:

C# : Difference between Hashtable and Dictionary

By mahingupta on Jan 31 2010 | 0 Comments


 

When we want a collection  data structure to hold data as key/value pairs, we have two obvious choices.

1. Dictionary

2. Hashtable

So basically what is the difference between both this and when to use which. Lets check it out. Point by Point.

1) Generics

Dictionary is a generic type, Hashtable is not. Now what that means. This is the most important aspect one should consider when taking decision. Dictionary is a generic type means

- You get type safety with Dictionary, because you can't insert any random object into it, and you don't have to cast the values you take out.

- And also generic collections are a lot faster as there's no boxing/unboxing

- Hashtable uses Object to hold things internally (Only non-generic way to do it). So you have to take care of type safety and cast it to appropriate data type when you take it out, but it also means that you can add keys and values of any type ( It is good or bad, well it depends :) )

- Again Hashtable also have to box/unbox, which may have memory consumption as well as performance penalties.

2) Thread Safety :

In .Net Hashtable is thread safe for use by multiple reader threads and a single writing thread, while in Dictionary public static members are thread safe, but any instance members are not guaranteed to be thread safe.

One more thing that can make difference is,  we can not use dictionary (generics) with web services. The reason is no web service standard supports generics standard.

Technorati Tags: ,,,,,,,,

Windows Live Tags: C#,Hashtable,Dictionary,collection,Generics,instance,services,supports,collections

WordPress Tags: C#,Hashtable,Dictionary,collection,Generics,instance,services,supports,collections

Follow me on Twitter |

Post info

Tags:
Categories: TechTips , C#

svn : Can not Parse lock / entries hashfile

By mahingupta on Dec 04 2009 | 0 Comments


Recently we moved our svn repositories from one URL to other. I don't remember exactly what happened, but we started to get error

“svn : Can not Parse lock / entries hashfile “

whenever we try to take lock or release any lock from on any file in that repository. I have tried a hell lot to solve this problem, but I was not able to solve it in a clean manner.

So I have decided to take reset all the locks and asked on StackOverflow to help me. I received answer from Ben Blank and I followed his advise. I have manually release all locks from repository by Deleting <root>/db/locks folder. And all the locks were reset again.

Caution : Make sure you take backup of your repositories before doing such things.

Technorati Tags:

Post info

Tags:
Categories: Asp.Net , TechTips , Subversion