C# service printing

T

Tom

Does anyone know if the following kb article applies to the .NET
framework 1.1?

http://support.microsoft.com/?kbid=324565

It states: 'Any service that is designed to print must directly use the
Win32 APIs, instead of the .NET Framework Printing classes.'.... 'This
behaviour is by design'

Is this true? Can we not safely use the C# printing API when running
as a service?

I am creating a console app that will run as a service. A major
function of this app will create and send print documents to a local
printer. It is written in C# and uses the PrintDocument class.

Has anybody successfully written something like this using the C#
printing API.
 
A

Angel J. Hernández M.

APPLIES TO
. Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2


Regards,
 
T

Tom

Hi... Thanks for replying.

Does this mean that if I am using .NET SDK 1.1 or greater, I will be
okay?

My concern is because the kb article stated that the "behaviour is by
design".
 
W

Willy Denoyette [MVP]

Tom said:
Does anyone know if the following kb article applies to the .NET
framework 1.1?

http://support.microsoft.com/?kbid=324565

It states: 'Any service that is designed to print must directly use the
Win32 APIs, instead of the .NET Framework Printing classes.'.... 'This
behaviour is by design'

Is this true? Can we not safely use the C# printing API when running
as a service?

I am creating a console app that will run as a service. A major
function of this app will create and send print documents to a local
printer. It is written in C# and uses the PrintDocument class.

Has anybody successfully written something like this using the C#
printing API.

The .NET Framework Printing classes are not designed nor supported in
Windows Services or any other Service like applications like asp, asp.net
etc...
The applies to in this KB article is misleading ast it makes you think it
only applies to Microsoft .NET Framework Software Development Kit 1.0
Service Pack 2 (which doesn't even exists, there is a SP2 for the framework
but not for the SDK), but it applies to all .NET versions, the use of the
System.Drawing.Printing classes is not supported from services.


Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top