Guest Ben Liddicott Posted July 29, 2009 Posted July 29, 2009 Hi, I am having a problem accessing a local printer on Windows 2003 64 bit, under IIS6.0 running a 32-bit ASP.Net application. Printers can be successfully enumerated, but not printed to. This previously worked, so is probably due to some configuration change or OS patch. I have narrowed it down, I think, to a problem calling CreateDC and friends (via p/invoke). We have detailed tracking turned on, so I can see that when this call is made the splwow64.exe is being started in the context of NETWORK SERVICE and immediately exits (with no delay). Simultaneously the CreateDC call hangs for 60 seconds exactly before returning NULL. GetLastError also returns zero in this case. Alternatively, if under ASP.Net I create a PrintDocument pd, set the printer name, then any of the following cause the same behavior. pd.PrinterSetings.Copies (property get) hangs for 2 minutes then returns 1, meantime Splwow64 starts and exits straight away. pd.IsValid() hangs for 2 minutes then returns 1 UNLESS get_Copies has been read first. meantime Splwo64 starts and exits immediately. In this case GetLastError returns 1702 (an RPC error) If I attempt to print as myself, using c:\windows \syswow64\notepad.exe, splwow64 starts as my username, everything works, and splwow64 quits after 5 minutes. so: Why is splwow64 starting as NETWORK SERVICE? I am using impersonation, so it should be starting as the impersonated user, surely? Why is splwow64 quitting immediately? There is nothing in the event log to say why. Is splwow64 is starting as network service because the impersonation is being dropped by IIS or USER32 for some reason? Is there some way I can make splwow64 be happy as NETWORK SERVICE? Any help will be much appreciated. Cheers, Ben Liddicott Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.