I am getting network printer when running my web project through IIS

J

jawaid alam

Hi all forum Member,

I am facing very tropical type of problem. I devoloped a intranet web
project. I want to print crystal report by selecting network printer.

I accessed all network printer in dropdownlist in crystal report page.

when i run crystal report page directly by set as startup page.
Dropdownlist shows all network printer. but when i run my project
through IIS Dropdownlist shows only localhost printers. its not showing
network printers.

i used this code to access all network printer in dropdownlist

Imports System.Drawing.Printing


DropDownList1.Items.Add("---Select Printer---")
Dim pkInstalledPrinters As String
' Find all printers installed
For Each pkInstalledPrinters In
PrinterSettings.InstalledPrinters
DropDownList1.Items.Add(pkInstalledPrinters)
Next pkInstalledPrinters

' Set the dropdownlist to the first printer in the list

DropDownList1.SelectedIndex = 0


Anybody if aware of this kind of problem
Please Suggest me as far as possible


Thank you
jawaid alam
 
M

Mohamad Elarabi [MCPD]

This might have something to do with the fact that locahost resolves to
127.0.0.1 which is not the same network your network printers are on. That is
the only thing I can think of. Try publishing the site and setting it up on
your local IIS service and browse to it by your machine name instead of
localhost. If that worked then I won't worry too much about it since you'll
never go to production on http://localhost.
Please let me know your findings. Thanks,
 
B

Boguslaw Faja

jawaid alam pisze:
Hi all forum Member,

I am facing very tropical type of problem. I devoloped a intranet web
project. I want to print crystal report by selecting network printer.

I accessed all network printer in dropdownlist in crystal report page.

when i run crystal report page directly by set as startup page.
Dropdownlist shows all network printer. but when i run my project
through IIS Dropdownlist shows only localhost printers. its not showing
network printers.

What kind of authentication do you use? Maybe IIS user doesnt have
access to printers?

br
 

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,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top