By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,610 Members | 1,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,610 IT Pros & Developers. It's quick & easy.

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

P: n/a


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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.