How to print from network printer ??????

  • Thread starter Thread starter ranu s
  • Start date Start date
R

ranu s

M trying to print image by calling print api (web based application )

As my knowledge is concerned aspnet account wont provide access to
netwrk printers .......

My questn is

1)How to print from network printer ??????

( I have set < identity impersonate=true/> and m having adminstrator
prvilege ,
even then its not wrking )

2) StartDocPrint returns 0 .

GetLastError returns 5


Can anybody help me in this regard



Thanks in advance
 
I'm going to assume you want to print something on the server side.

Why are you calling GetLastError? Are you declaring it yourself? You
shouldn't do this. If you are calling an API function, make sure that the
SetError property on the DllImport attribute is set to true, and then call
the GetLastWin32Error method on the Marshal class to get the last error.

Then, you can look that error up in winerror.h in the platform sdk to
find out what the error is.

If you show the code you use to print, it would help as well.
 

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

Back
Top