I have a form library with a custom form associated. A user clicks "New form", inputs data in the form, and the form is saved to the library. Meanwhile, my logic in the eventreceivers generate a Word document and saves it to another library.
ItemAdded takes in a SPItemEventProperties properties object. It then uses properties.ListItem.File to get the data from the form.
This works the first time a document is created after the event receiver/solution is deployed. The SPFile has a length of 3k, and after I open it in binary it has an array of length 3k.
The second time and from then on, the SPFile object is not fully "saturated". The length-property of the file is 0, and the binary stream of the property yields an empty array. However, the File is not null, it has the correct name etc., just no content!
How could this be?