Hello,

I am developing a dll for use in a client app, and also for an asp.net
webservice.  The part of the dll's function is to print some a label
to a default printer.  For the webservice, it is not printing
correctly.

I am assuming that this is because the printing preferences haven't
been set for the user.
It looks like asp.net webservice is running under an asp_net user that
isn't allowed to log in to the desktop( to right-click on the printer
and setup printer preferences)

The printer preferences are different for every printer, so I can't
statically set them up in the code(these are barcode printers so they
are even more complicated..)

So my problem is that I either need to run the webservice as a user
that can log into the desktop to change the printer preferences, or
some how change the printer preferences for the asp_net user.

The call I am making to get the defaults for the printer is(dll is
MFC.. sorry):

AfxGetApp()->GetPrinterDeviceDefaults(&pPrintDlg);
then I create a device context from this and print to that device
context(printDC)

The webservice just setups up what needs to be printed and then calls
the print function in the dll...

Any insight into changing the user of the asp.net webservice?

Should I be thinking a different way?

Thanks,
Jon



Reply via email to