c# - Server Error in '/' Application. No printers are installed -
server error in '/' application.
no printers installed.
description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.
exception details: system.drawing.printing.invalidprinterexception: no printers installed.
source error:
line 166: line 167: line 168: rpt.printtoprinter(1, false, 0, 0); line 169: line 170: //response.redirect("~/savingsaccountreg.aspx"); source file: d:\inetpub\vhosts\atmnidhi.com\httpdocs\savingreport.aspx.cs line: 168
stack trace:
[invalidprinterexception: no printers installed.] system.drawing.printing.printersettings.gethdevmodeinternal(string printer) +199408 system.drawing.printing.printersettings.gethdevmodeinternal() +28 system.drawing.printing.printersettings.gethdevmode(pagesettings pagesettings) +48 crystaldecisions.crystalreports.engine.printoptions.copyto(printersettings printer, pagesettings page) +322 crystaldecisions.crystalreports.engine.formatengine.printtoprinter(int32 ncopies, boolean collated, int32 startpagen, int32 endpagen) +176 crystaldecisions.crystalreports.engine.reportdocument.printtoprinter(int32 ncopies, boolean collated, int32 startpagen, int32 endpagen) +73 savingreport.btnsave_click(object sender, eventargs e) in d:\inetpub\vhosts\atmnidhi.com\httpdocs\savingreport.aspx.cs:168 system.web.ui.webcontrols.button.onclick(eventargs e) +9633962 system.web.ui.webcontrols.button.raisepostbackevent(string eventargument) +103 system.web.ui.webcontrols.button.system.web.ui.ipostbackeventhandler.raisepostbackevent(string eventargument) +10 system.web.ui.page.raisepostbackevent(ipostbackeventhandler sourcecontrol, string eventargument) +13 system.web.ui.page.raisepostbackevent(namevaluecollection postdata) +35 system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) +1724 version information: microsoft .net framework version:4.0.30319; asp.net version:4.0.30319.34237
no printers installed.
description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.
exception details:
system.drawing.printing.invalidprinterexception: no printers installed.
how solve error
assuming intend allow web request cause printer connected server print out
- make sure there default printer configured server
- make sure identity under web application running has permission access printer.
note if hacker gained access web page, cause go through quite bit of paper , ink/toner :-)
Comments
Post a Comment