After testing it carefully (also from other machines) I should make a correction - it DOES NOT work when the interactive account is different, from the account used for impersonation with DCOMCNFG.
So finally this is the solution:
out-of-process EXE server configured with DCOMCNFG to start as interactive user. The machine cannot print to file, if there is NO logged user. (This means that someone should log into the server - this is not a problem because you can lock the computer after the login)
Thanks again.
I think this can be a good article for the UT FAQ.
>Zlatin,
>
>Glad you found a solution. Thanks for posting it here.
>
>>Well, I have done a lot of search over the West-wind threads, and actually has found the solution. It is the post of Jakob Veber
>>
REPORT FORM ... TO FILE doesn't work ?? >>
http://www.west-wind.com/wwthreads/ShowMsg.wwt?MsgId=0520E4HGA>>
>>"
I had to configure that EXE server with DCOMCNFG to start as interactive user."
>>
>>So this one works for me - to summarize:
>>
>>It should be out-of-process COM, configured with DCOMCNFG to run as a user different from the launching user (which in my case is the IUSR_ anonymous account). This can be the interactive user (if there is no interactive user logged in - the component will run as SYSTEM acccount) or better - specific user that has been granted rights to the required level. I will investigate further, what should be this account in order to be possible to print to file.
>>
>>Thanks for your help
>>
>>>Zlatin,
>>>
>>>Have you asked this question on the ww message board (
http://www.west-wind.com/wwthreads)?
>>>
Zlatin Zlatev,
MCSD (VS6)Make solutions, not programs!