[英]Server Error in '/' Application. No printers are installed
“ /”應用程序中的服務器錯誤。
沒有安裝打印機。
說明:執行當前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:未安裝打印機。
如何解決這個錯誤
假設您實際上打算允許Web請求使連接到服務器的打印機將某些內容打印出來
請注意,如果黑客獲得了對該網頁的訪問權限,則可能會導致您花費大量紙張和墨水/墨粉:-)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.