【发布时间】:2015-07-03 20:12:40
【问题描述】:
“/”应用程序中的服务器错误。
没有安装打印机。
说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.Drawing.Printing.InvalidPrinterException:未安装打印机。
来源错误:
Line 166:
Line 167:
Line 168: rpt.PrintToPrinter(1, false, 0, 0);
Line 169:
Line 170: //Response.Redirect("~/SavingsAccountReg.aspx");
源文件:d:\inetpub\vhosts\atmnidhi.com\httpdocs\savingreport.aspx.cs 行:168
堆栈跟踪:
[InvalidPrinterException: No printers are 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
版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34237
没有安装打印机。
说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详情:
System.Drawing.Printing.InvalidPrinterException:没有打印机 已安装。
【问题讨论】:
-
如何解决这个错误