splwow64.exe exits immediately and CreateDC fails under IIS

Discussion in 'Windows 64bit' started by Ben Liddicott, Jul 29, 2009.

  1. 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
    Ben Liddicott, Jul 29, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stuart Middleton-White

    Kodak to Slash Up to 15,000 Jobs as It Exits Film Market

    Stuart Middleton-White, Jan 22, 2004, in forum: Digital Photography
    Replies:
    1
    Views:
    321
    B. Peg
    Jan 23, 2004
  2. Roy Tony

    DVD and CD recorder all in one-exits?

    Roy Tony, Oct 24, 2005, in forum: DVD Video
    Replies:
    3
    Views:
    417
  3. =?Utf-8?B?YWpzdGFkbGlu?=

    SplWOW64.exe prevents RDP sessions from disconnecting.

    =?Utf-8?B?YWpzdGFkbGlu?=, Jan 27, 2007, in forum: Windows 64bit
    Replies:
    2
    Views:
    2,962
    Kirk.RS
    Oct 26, 2009
  4. =?Utf-8?B?dnNvYXJlcw==?=

    splwow64.exe causes RDP Sessions to Hang After Closing Application

    =?Utf-8?B?dnNvYXJlcw==?=, Sep 12, 2007, in forum: Windows 64bit
    Replies:
    3
    Views:
    7,246
    BMTaylor10
    May 6, 2009
  5. arno sebastian
    Replies:
    0
    Views:
    1,701
    arno sebastian
    Apr 30, 2010
Loading...

Share This Page