Impersonation Problem on Windows XP
Posted on 2007-07-30
I have a program that uses impersonation. On one clients pc, it doesn't work. The operating system is Windows XP, SP2.
I thought the issue was with report viewer, but it seems more to do with impersonation.
I ran some test programs, and this is what happens:
1) Reports without impersonation work fine
2) Programs with impersonation generate temp dll files, and then reports won't launch as I get a message about
'C:\Documents and Settings\theusername\Local Settings\Temp\expression_host_abc12324334435435435.dll in use by another process'
3) And now the freaky one. I wrote a simple program that just prints the contents of a folder to a report. Added a tick box, so that Impersonation can be turned on/off. With Impersonation off, everything ok. Turn impersonation off, and I get the '....dll in use by another process' message above.
However, once that message is generated, the program will never run again! Even if I reboot the pc. Or remove and re install the program. Once impersontation has been used, it won't run again, even if don't use impersonation again.
This one is really baffling me. I know that on Win 2000 pcs, local security settings had to be changed to get impersonation to work. But I haven't read anything similiar for Windows XP.
Any help appreciated!