locked
WPF not working at all in a Windows Service? RRS feed

  • Question

  • Hello,

    WinFX documentation states that WPF in the context of a service is not supported (http://windowssdk.msdn.microsoft.com/library/en-us/wcp_conceptual/html/bf7c18db-fe5d-4f72-81c7-14079aa4ecf4.asp).

    Imagine we want to develop a server application that can

    • receive documents / print jobs in various formats
    • load, manipulate, save images
    • create and format flow / fixed documents
    • print / archive documents

    It is required that the application runs without a user being logged in, and runs in fully-automated mode, so the natural choice would be to implement it as Windows Server.

    Question: Will WPF elements not work AT ALL in a Windows Service, or do we just have similar restrictions as with GDI / GDI+?

    Your advice would be appreciated.

    Best regards,

    Adrian

    Tuesday, January 31, 2006 12:47 PM

Answers

  • Adrian, it may be possible to do one or all of the things you have mentioned. But when we say we do not support this scenario, aside from the more obvious meaning, it means that features in the platform weren't designed with the intent of running within the context of a service, and consequently we do not test such scenarios.
    Monday, March 13, 2006 11:10 PM

All replies

  • I try to clarify my question:

    We are aware that a Windows Service should not show any UI, and we will design the application appropriately.
     
    The purpose of our Windows Service application would essentially be to load, manipulate, combine, format, print, render to an image, and archive XAML documents (and documents / print jobs in other formats). We need to implement our application as Windows Service BECAUSE it must run without a user being logged in. There will be no user interacting directly with the application. (We will create a separate, "normal" UI-intensive Windows Application where the user can define the processing rules for the Windows Service, e.g. to tell what to do when a new XAML file "xyz" is found in directory "abc".)
     
    So my question is whether or not it is possible from within a Windows Service to use classes from the following namespaces:
     
    System.Windows.Documents (for example FixedDocument, FixedPage)
    System.Windows.Shapes
    System.Windows.Controls
    ...
     
    I would appreciate your comments!

    Wednesday, February 1, 2006 11:34 AM
  • Adrian, it may be possible to do one or all of the things you have mentioned. But when we say we do not support this scenario, aside from the more obvious meaning, it means that features in the platform weren't designed with the intent of running within the context of a service, and consequently we do not test such scenarios.
    Monday, March 13, 2006 11:10 PM