Server-side printing from ASP.NET and MS Word

Discussion in 'ASP .Net Security' started by redraven, Sep 22, 2004.

  1. redraven

    redraven Guest

    Hi,

    I know this is a bit of tired topic, but I still can't get my webapp
    to work properly.

    The scenario:
    My client wants to
    1) use a web interface
    2) to print
    3) a word document on our internal web server
    4) on two seperate shared printers on the local network! (Yeah I
    know).

    The setup:
    - Two servers:
    * Web server with IIS and Word and the docs and
    * Print server with the two shared printers.
    - Client: Just a browser

    First, I've written the ASP.NET and C# code on my own machine and
    managed to fire up Word (with the COM object) and print to my local
    printer (server side) with the ASPNET account. (Just had to add
    printer permissions for ASPNET account).

    Next, I moved my app to the web server and changed the permissions on
    the print server so that NETWORK SERVICE has access to the printer.
    When Word fires up and starts to print, the document shows up in the
    queue, but with the status "Error - Printing".

    I had a look at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q184291
    and made the changes, but was still unable to print.

    Then, I gave the "Everyone" and "Anonymous" accounts access to the
    printer (just for troubleshooting) to no avail.

    I also tried impersonation (of the "Administrator" account!!) and the
    Word.exe runs under successfully under that User name
    ("Administrator"), but it still doesn't work. One thing changed
    though; the document shows up in the printer queue for a split second
    and then disappears. The message in the print server's Event Viewer is
    as follows: "Document 7, Microsoft Word - MyDoc.doc owned by
    Administrator was deleted on HPLaserJet".

    I'm out of ideas.

    Any help will be greatly appreciated!

    Best,
    Andre
     
    redraven, Sep 22, 2004
    #1
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.