Can't see network printers in IIS

Discussion in 'ASP General' started by calan_svc@yahoo.com, May 3, 2007.

  1. Guest

    I have a dll I wrote in VB6. Basically, it can list all the printers
    it
    finds as well as print to a selected printer.

    I created a test app in VB6, added the dll as a reference, and added
    the
    following in a button click:

    Dim config As New MyUtility
    lblList = Replace(config.PrinterList, ":", vbCrLf)
    Set config = Nothing

    This works fine, and returns a list of all printer devices on my
    computer,
    including shared network computers:

    SnagIt 7
    Lexmark Z22-Z32 Color Jetprinter
    \\ME-3\Dell Photo Printer 720
    \\ENG\Epson 2
    \\big\E834450
    \\big\hp color LaserJet 3500.

    Heres the problem...when I create this same object in an ASP page
    (same
    computer), IIS is only returning the printers that are physically
    connected
    to this PC.

    set config = CreateObject("MyDLL.MyUtility")
    response.write replace(config.PrinterList,":","<br>")
    set config = nothing

    which returns:

    SnagIt 7
    Lexmark Z22-Z32 Color Jetprinter

    Why does the dll not see network printers when called from ASP, but it
    does
    when called from a VB app? I've checked all the permissions for the
    class in
    registry, etc.

    Thanks in advance!

    Calan
     
    , May 3, 2007
    #1
    1. Advertising

  2. Guest

    On May 3, 1:45 pm, wrote:
    > I have a dll I wrote in VB6. Basically, it can list all the printers
    > it
    > finds as well as print to a selected printer.
    >
    > I created a test app in VB6, added the dll as a reference, and added
    > the
    > following in a button click:
    >
    > Dim config As New MyUtility
    > lblList = Replace(config.PrinterList, ":", vbCrLf)
    > Set config = Nothing
    >
    > This works fine, and returns a list of all printer devices on my
    > computer,
    > including shared network computers:
    >
    > SnagIt 7
    > Lexmark Z22-Z32 Color Jetprinter
    > \\ME-3\Dell Photo Printer 720
    > \\ENG\Epson 2
    > \\big\E834450
    > \\big\hp color LaserJet 3500.
    >
    > Heres the problem...when I create this same object in an ASP page
    > (same
    > computer), IIS is only returning the printers that are physically
    > connected
    > to this PC.
    >
    > set config = CreateObject("MyDLL.MyUtility")
    > response.write replace(config.PrinterList,":","<br>")
    > set config = nothing
    >
    > which returns:
    >
    > SnagIt 7
    > Lexmark Z22-Z32 Color Jetprinter
    >
    > Why does the dll not see network printers when called from ASP, but it
    > does
    > when called from a VB app? I've checked all the permissions for the
    > class in
    > registry, etc.
    >
    > Thanks in advance!
    >
    > Calan


    I should also mention that this on an XP Pro box... but it will also
    need to work on Windows Server 2003.
     
    , May 3, 2007
    #2
    1. Advertising

  3. <> wrote in message
    news:...
    > Heres the problem...when I create this same object in an ASP page
    > (same
    > computer), IIS is only returning the printers that are physically
    > connected
    > to this PC.
    >
    > set config = CreateObject("MyDLL.MyUtility")
    > response.write replace(config.PrinterList,":","<br>")
    > set config = nothing
    >
    > which returns:
    >
    > SnagIt 7
    > Lexmark Z22-Z32 Color Jetprinter


    Just taking a stab here....
    The ASP Script runs under that account IIS runs under (IUSR_machinename). This
    is a special local system service account that has a scope of influence limted
    to the local machine. It can not access network resources.

    --
    Phillip Windell
    www.wandtv.com

    The views expressed, are my own and not those of my employer, or Microsoft, or
    anyone else associated with me, including my cats.
    -----------------------------------------------------
     
    Phillip Windell, May 4, 2007
    #3
    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. Dexter

    How to list network printers?

    Dexter, Jan 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    435
    Dexter
    Jan 7, 2005
  2. Replies:
    0
    Views:
    508
  3. Replies:
    0
    Views:
    629
  4. Replies:
    0
    Views:
    382
  5. Matt Chan
    Replies:
    3
    Views:
    696
Loading...

Share This Page