Errors CS2001 & CS2008 While Swiping Card

This is a known issue, especially with Windows Vista, resulting in the following message:

There was an error in serializing body of message : 'Unable to generate a temporary class (result = 1).
error CS2001: Source File 'C:\Windows\TEMP\...' could not be found
error CS2008: No imports specified
'.  Please see InnerException for more details.

If you see this error, the resolution is simple: 

  1. Open Windows Explorer and navigate to the C:\Windows directory.
  2. Right click on the TEMP folder, and select the Security tab
  3. Click on the Advanced button at the bottom right
  4. Under the Permissions tab, select the Users permission entry in the list, and click Edit.
    1. If you don't see a list, but a Continue button, click it first
  5. In the permission entry dialog, allow the users Write and Delete on the directory, click OK, and confirm any warnings until you reach the security settings dialog again.
  6. In the security settings dialog, be sure to select the 'Replace all child object permission entries' check box at the bottom, and click OK, confirming any warnings.
That's about it - your card swipe should work as expected going forward.

Feedback and Knowledge Base