Ask a Question related to ASP.NET Security, Design and Development.
-
Tessa #1
print to network printer using ASP.NET on IIS6 (2003 Server)
Is there any security reason why you cannot print to a network printer from
ASP.NET under IIS6 on Windows 2003 server?
I'm using ASP.NET code to print to a server print queue using
PrintDocument.Print()
(.NET framework v 1.1)
I can print to a local printer plugged into LPT1 on the web server, but not
to a network printer.
The same printing code to a network printer works in a .NET web app when
hosted on Windows XP pro, or Windows 2000 Server, but NOT on Windows 2003
server.
The same printing code to a network printer also works in a .NET Windows app
on Windows 2003 server, when logged in to Windows as the same user that the
web app is impersonating (DOMAIN\webaccount), so we know this account has
sufficient permission to print to the netowrk printer.
Web app configuration details:
Web.config has <authentication mode="windows"/> <identity
impersonate="true">
Web Application is running in a virtual directory on the Default Web Site
Virtual directory Security: anonymous access is enabled, & set to use the
specific Windows domain account DOMAIN\webaccount. All the other
authenticated access methods are disabled/unchecked
Application pool: our Web Application is using a specific application pool
that uses DOMAIN\webaccount as its identity.
IIS 6 is not running in IIS 5 isolation mode.
The errror from PrintDocument.Print() is
System.Drawing.Printing.InvalidPrinterException: Tried to access printer
'\\REMOTEMACHINE\PrinterName' with invalid settings.
Full stack trace when call PrintDocument.Print:
System.Drawing.Printing.InvalidPrinterException: Tried to access printer
'\\REMOTEMACHINE\PrinterName' with invalid settings. at
System.Drawing.Printing.PrinterSettings.GetHdevmod eInternal() at
System.Drawing.Printing.PrinterSettings.GetHdevmod e(PageSettings
pageSettings) at
System.Drawing.Printing.PrintController.OnStartPri nt(PrintDocument document,
PrintEventArgs e) at
System.Windows.Forms.PrintControllerWithStatusDial og.OnStartPrint(PrintDocum
ent document, PrintEventArgs e) at
System.Drawing.Printing.PrintController.Print(Prin tDocument document) at
System.Drawing.Printing.PrintDocument.Print() at
PrintingGDI.WebForm1.Button1_Click(Object sender, EventArgs e)
What could be preventing ASP.NET from printing to a network printer?
Thanks for any ideas,
Tessa
Tessa Guest
-
Installing CF 5.0 server on Windows 2003 with IIS6
Hello, Can anyone tell me if it is ok to install CF 5.0 server on win2003 server using iis 6? thank you Sanjay -
CF7 / IIS6 / Win 2003 Server Install Problem
Hi, any help would be very much appreciated as MACROMEDIA have provided no useful help. One would think they would have a decent level of... -
Error ASP 0178 on Windows 2003 Server (IIS6) by Server.CreateObject on DCOM registred Component
Heres is a workaround, 1. go to Administrative Tools> Component Services 2. expand COM Services and right click on My computer. 3. click... -
Illustrator will not print to network printer
We have a ricoh 6300 printer, and Illustrator, version 10.0 stopped printing to this on printer. All other programs will print to it, and Illustrator... -
WINXP CLIENT CANT PRINT TO NETWORK PRINTER
When I install the network printer on a winxp home client, it seems to work ok. Then when the client is restarted the winxp home client can't print... -
Guest #2
Re: print to network printer using ASP.NET on IIS6 (2003 Server)
I am having the same problem. Did you ever figure out what was the problem?
Thanks,
Jorge
User submitted from AEWNET ([url]http://www.aewnet.com/[/url])> Is there any security reason why you cannot print to a network printer from
> ASP.NET under IIS6 on Windows 2003 server?
>
> I'm using ASP.NET code to print to a server print queue using
> PrintDocument.Print()
> (.NET framework v 1.1)
> I can print to a local printer plugged into LPT1 on the web server, but not
> to a network printer.
>
> The same printing code to a network printer works in a .NET web app when
> hosted on Windows XP pro, or Windows 2000 Server, but NOT on Windows 2003
> server.
> The same printing code to a network printer also works in a .NET Windows app
> on Windows 2003 server, when logged in to Windows as the same user that the
> web app is impersonating (DOMAIN\webaccount), so we know this account has
> sufficient permission to print to the netowrk printer.
>
> Web app configuration details:
> Web.config has <authentication mode="windows"/> <identity
> impersonate="true">
> Web Application is running in a virtual directory on the Default Web Site
> Virtual directory Security: anonymous access is enabled, & set to use the
> specific Windows domain account DOMAIN\webaccount. All the other
> authenticated access methods are disabled/unchecked
> Application pool: our Web Application is using a specific application pool
> that uses DOMAIN\webaccount as its identity.
> IIS 6 is not running in IIS 5 isolation mode.
>
> The errror from PrintDocument.Print() is
> System.Drawing.Printing.InvalidPrinterException: Tried to access printer
> '\\REMOTEMACHINE\PrinterName' with invalid settings.
>
> Full stack trace when call PrintDocument.Print:
> System.Drawing.Printing.InvalidPrinterException: Tried to access printer
> '\\REMOTEMACHINE\PrinterName' with invalid settings. at
> System.Drawing.Printing.PrinterSettings.GetHdevmod eInternal() at
> System.Drawing.Printing.PrinterSettings.GetHdevmod e(PageSettings
> pageSettings) at
> System.Drawing.Printing.PrintController.OnStartPri nt(PrintDocument document,
> PrintEventArgs e) at
> System.Windows.Forms.PrintControllerWithStatusDial og.OnStartPrint(PrintDocum
> ent document, PrintEventArgs e) at
> System.Drawing.Printing.PrintController.Print(Prin tDocument document) at
> System.Drawing.Printing.PrintDocument.Print() at
> PrintingGDI.WebForm1.Button1_Click(Object sender, EventArgs e)
>
> What could be preventing ASP.NET from printing to a network printer?
>
> Thanks for any ideas,
>
> Tessa
>
>
Guest Guest



Reply With Quote

