I am getting network printer when running my web project through IIS
am 28.12.2007 06:58:16 von 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
*** Sent via Developersdex http://www.developersdex.com ***
RE: I am getting network printer when running my web project through I
am 28.12.2007 11:34:01 von MohamadElarabiMCPD
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 ***
>
Re: I am getting network printer when running my web project throughIIS
am 28.12.2007 13:58:23 von 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