
If printing is required from a service (but you shouldn't), you have to send the request to another service (or better a COM+ server application - see System.EnterpriseServices) Printer devices are bound to the context of an interactive user, their attributes are strored in the profile (user hive) of the current user (see HKCU).Ī web service runs in the context of a non interactive user (ASPNET by default), so there is no specific user profile loaded for webservices or any other service for that matter (aspnet has no user profile). You can't enumerate Printers from a service.
Sharp printers website windows#
You can't use the printer classes from a service (a webservice runs in the context of a windows service)Ģ. The Web Service runs but I am not sure, does anyone have any ideas on this.ġ. I believe this problem is related to permissions for the user under which The function to retrieve a list of prints I only get a small sub-set of However if the test application first calls a Web Service which then calls Windows application on the server and calling the function directly. Printers installed on the local machine which works fine when using a test I am using the PrinterSettings.InstalledPrinters to access a list of Gates" wrote in am having a little trouble accessing a list of printers on our Network
Sharp printers website how to#
WindowsIdentity class, and see how to impersonate a user for a section ofĬode (instead of all code in a directory). Or, you could look at the documentation of the Impersonate method on the Specify the user to run the service under. Have to change the web.config file for the directory the service is in to Byĭefault, the service is running under the ASPNET local account. First off, let me say what an honor it is that you are gracing ourĪnyways, it most likely is a permissions issue like you stated.
