1
Server Error in '/' Application.
Error: cannot find the default printer.
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.Exception: Error: cannot find the default printer.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Exception: Error: cannot find the default printer.]
   Vriddhi.Registration.Print() in D:\Jitendra\My Works\Vriddhi2\Code\Vriddhi\Registration.aspx.cs:1018
   Vriddhi.Registration.PrintButtonClick(Object sender, EventArgs e) in D:\Jitendra\My Works\Vriddhi2\Code\Vriddhi\Registration.aspx.cs:1000
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   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) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 
4

1 回答 1

0

您的 web 应用程序将在用户帐户下运行,该用户帐户很可能尚未定义默认打印机。最有可能的是,它甚至没有系统中任何打印机的访问权限。

您将需要调整运行应用程序的帐户和打印权限。

于 2012-08-30T13:28:30.327 回答