Can"t see network printers in IIS

Can"t see network printers in IIS

am 03.05.2007 20:45:20 von calan_svc

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,":","
")
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

Re: Can"t see network printers in IIS

am 03.05.2007 20:49:06 von calan_svc

On May 3, 1:45 pm, calan_...@yahoo.com 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,":","
")
> 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.

Re: Can"t see network printers in IIS

am 04.05.2007 22:46:51 von Phillip Windell

wrote in message
news:1178217920.659239.74100@e65g2000hsc.googlegroups.com...
> 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,":","
")
> 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.
-----------------------------------------------------