Can't see network printers in IIS

C

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

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,":","<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.
 
P

Phillip Windell

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.
-----------------------------------------------------
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top