469,646 Members | 1,471 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

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



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

*** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '07 #1
2 2644
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,

--
Mohamad Elarabi
MCP, MCTS, MCPD.
"jawaid alam" wrote:
>

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

*** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '07 #2
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
Dec 28 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Karthick_Microsoft | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.