• How to print directly report using Web Client Print with enables authentication in ASP.NET MVC?

    by  • November 6, 2015 • Microsoft .NET Framework, Microsoft ASP.NET, Microsoft ASP.NET MVC • 0 Comments

    In previous article, you have read how to use Web Client Print in ASP.NET MVC. I also discussed that Web Client Print did not work with enabled window authentication. In this I will explain how Web Client Print works with enable window authentication in ASP.NET MVC.


    Add a folder with name App_Code and make a new class with name Utils.cs. Then write following code:


    Open web.config file. This is main configuration file and writes below code to enable window authentication. Also enables window authentication in project properties.

    Generic  Handler (ReportPrint.ashx):

    Make a generic handler and name it ReportPrint.ashx. The code in generic handler is almost similar to controller of previous article.


    Add below code in view.cshtml file. Only one line needs to replace with following line:


    Best WordPress Themes and Plugins with Great Team and Support!

    Avatar of Abdul Rehman


    Abdul Rehman writes on .NET technologies at GetCodeSnippet.com. GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.


    Leave a Reply