It turns out that the field is (internaly) a look up field - which means it expects a number as an input.
You cant do :
- item["Assigned To"] = "administrator";
- item["Assigned To"] = "firstname.lastname@example.org";
- item["Assigned To"] = "demo\\administrator";
Instead, you have to specify the user ID from the user's list:
item["Assigned To"] = 1;
But how to tell what ID does a user have?
The only way I know of is using the "Users" property of the SPWeb object. Lets say you want to assign the field to email@example.com (you only know the email). you can use the following code:
item["Assigned To"] = item.ParentList.ParentWeb.Users.GetByEmail("firstname.lastname@example.org").ID;
string  domainName = new string;
domainName = "demo\\ishai";
Liked it? Please kick me!