foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) { DropDownList1.Items.Add(printer); }
Server Error in '/' Application. The RPC server is unavailable Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ComponentModel.Win32Exception: The RPC server is unavailable Source Error: Line 47: DropDownList1.Items.Add("Select"); Line 48: Line 49: foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) Line 50: { Line 51: DropDownList1.Items.Add(printer); Source File: d:\inetpub\vhosts\interactivelogestic.com\httpdocs\CargoManagementDomainCopy\billprint.aspx.cs Line: 49 Stack Trace: [Win32Exception (0x80004005): The RPC server is unavailable] System.Drawing.Printing.PrinterSettings.get_InstalledPrinters() +455 Inventry.customerledger.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\interactivelogestic.com\httpdocs\CargoManagementDomainCopy\billprint.aspx.cs:49 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18055
Quote:A Web application does not have access to client systems, for a good reason. Imagine for a second that it was possible. Would any reasonable user like that some unknown site could discover printers or other equipment? This even sounds scary.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)