Yeah, there's really no answer to your "question" because that's not the complete error message. It's impossible to tell you what's wrong because there's more than just a couple of lines of code in Global.asax.
Means there already is a record with id '0' in the database. If it is not an auto-incrementing field, you might need a way to get the last and increment it. If it is a new application, then it may be easier to change the type of the field to a GUID and put a freshly generated GUID in there.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
This may sound crazy but I have many copies of a .net project's source code in source control but am trying to figure out which copy of the source code in the version control system is the correct code that was used to build the currently deployed production application's projects. The application was deployed several years ago and we have several versions of the source code but don't know which version in source control matches the actual production's code. I have read about reflector but was wondering if there was a more simple was to go. Can anyone help?
Can't unless you adhered to a rational software lifecycle pattern and it sounds like you (or they?) didn't. Look for a branch or a label or something that might give a clue. Which version control system?
One final thought I had was to download the production project dll's and one at a time for each dll load the project's code from source control into Visual Studio as a individual projects. Next, make sure all of the production dlls, exception for the one who's source code is being build are referenced, compile in release mode, then compaire file sizes. Does this this make since?
Even a byte-by-byte comparison may not work.
A some point in the past, Microsoft compilers started adding information to each executable file (timestamp?), so that compiling the same source twice in succession didn't create identical executable files.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton