DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 21 Aug 2007 10:34:03 -0700,    posted on: microsoft.public.dotnet.framework.webservices        back       

Thread Index
  1    Mark624
          2    Mark624
          3    John Saunders [MVP] john.saunders at trizetto.com


Printing from a Web Method   
I have a web method that renders a SQL Reporting Services report and prints 
it to a network printer using the System.Drawing and System.Drawing.Printing 
namespaces in .Net 2.0.  This method has been working without issues in 
production at several client sites but now I've started seeing memory errors 
when trying to print.  The only way to resolve the errors has been to do an 
IISReset on the web server hosting the web service.  I tried calling 
Microsoft support for assistance in troubleshooting the issue and found out 
that using System.Drawing in an ASP.Net application, ASP.Net Web Service and 
in a Windows Service is not supported.  Does anyone have any alternative ways 
to print from a web service to a network printer?  I'm trying to find a 
managed code way of doing this but I'm not finding anything but 
System.Drawing.Printing.  

Thanks for the help.

Mark
Date:Tue, 21 Aug 2007 10:34:03 -0700   Author:  

Re: Printing from a Web Method   
Hi John,

Thanks for the response!  The thought of using a Windows Service crossed my 
mind too as an alternate but that is not supported either.  Any other 
thoughts?  My only other idea so far is to write a console application that 
does the printing and have my web method start the console app with the 
appropriate parameters.  It just seems like there has to be a better way.

Thanks for any ideas!

Mark
Date:Tue, 21 Aug 2007 19:12:00 -0700   Author:  

Re: Printing from a Web Method   
"Mark624"  wrote in message 
news:3F9E4149-7D8C-41B9-8827-1B98980B5B9D@microsoft.com...

> Hi John,
>
> Thanks for the response!  The thought of using a Windows Service crossed 
> my
> mind too as an alternate but that is not supported either.  Any other
> thoughts?  My only other idea so far is to write a console application 
> that
> does the printing and have my web method start the console app with the
> appropriate parameters.  It just seems like there has to be a better way.


Another set of alternatives would be to use either .NET Remoting or Windows 
Communications Framework (WCF) to talk to a "Windowless" Windows Forms 
application. This would be a normal Winforms application except that it 
would not display its form. Both Remoting and WCF can be hosted in this sort 
of application.

The question for your Microsoft contacts is whether or not the window is 
required for printing to be supported, or if it only needs to be in a 
Windows Forms application.
-- 
John Saunders [MVP]
Date:Wed, 22 Aug 2007 00:15:35 -0400   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us