Click here to Skip to main content
16,005,037 members
Home / Discussions / C#
   

C#

 
QuestionCorrect way to abort a Suspended thread? Pin
Christian Merritt15-Apr-03 3:24
Christian Merritt15-Apr-03 3:24 
AnswerRe: Correct way to abort a Suspended thread? Pin
Daniel Turini15-Apr-03 3:47
Daniel Turini15-Apr-03 3:47 
GeneralRe: Correct way to abort a Suspended thread? Pin
Christian Merritt15-Apr-03 3:54
Christian Merritt15-Apr-03 3:54 
AnswerRe: Correct way to abort a Suspended thread? Pin
Martin Cook15-Apr-03 8:26
professionalMartin Cook15-Apr-03 8:26 
GeneralRe: Correct way to abort a Suspended thread? Pin
Christian Merritt15-Apr-03 15:00
Christian Merritt15-Apr-03 15:00 
GeneralRe: Correct way to abort a Suspended thread? Pin
James T. Johnson15-Apr-03 19:47
James T. Johnson15-Apr-03 19:47 
AnswerRe: Correct way to abort a Suspended thread? Pin
Adam Turner15-Apr-03 19:00
Adam Turner15-Apr-03 19:00 
GeneralPrinting from a WebForm in C#/ASP.Net Pin
Vasudevan Deepak Kumar15-Apr-03 1:20
Vasudevan Deepak Kumar15-Apr-03 1:20 
Hi,

I am trying to print on serverside using C# on a WebForm. When I called the Print() of PrintDocument, I am getting the error

'No Printers Installed'. Perhaps this was because of different account with which it was running. I made impersonate true in web.config and in the class constructor did the following:

C#
   int userAuthToken = 0;
  LogonUser("deepak","DeepakWorld","monkey",8,0,out userAuthToken);
  WindowsIdentity.Impersonate(new IntPtr(userAuthToken));
System.Diagnostics.Trace.Write(WindowsIdentity.GetCurrent().Name);
  where LogonUser is the method in advapi32.dll


Before print, when I queried the CurrentIdentity, it revealed and confirmed that it was running DeepakWorld/deepak. But still it is saying 'No Printers installed' I have printers installed.

When I directly asked it to print using

print.PrinterSettings.Printer = @"\\Kennel\GP142";

it says:

Tried to access printer '\\Kennel\GP142' with invalid settings.

Please advise on how to print from a WebForm.

Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
GeneralMaximizing Event (Or Not) Pin
Adam Turner15-Apr-03 0:49
Adam Turner15-Apr-03 0:49 
GeneralRe: Maximizing Event (Or Not) Pin
Srinivasa Raghavan15-Apr-03 1:46
Srinivasa Raghavan15-Apr-03 1:46 
GeneralRe: Maximizing Event (Or Not) Pin
Adam Turner15-Apr-03 18:46
Adam Turner15-Apr-03 18:46 
GeneralGenerating random number of fixed-size Pin
Gerry14-Apr-03 21:45
Gerry14-Apr-03 21:45 
GeneralRe: Generating random number of fixed-size Pin
Nnamdi Onyeyiri14-Apr-03 23:42
Nnamdi Onyeyiri14-Apr-03 23:42 
GeneralRe: Generating random number of fixed-size Pin
Nick Seng14-Apr-03 23:46
Nick Seng14-Apr-03 23:46 
GeneralRe: Generating random number of fixed-size Pin
Nnamdi Onyeyiri14-Apr-03 23:49
Nnamdi Onyeyiri14-Apr-03 23:49 
GeneralRe: Generating random number of fixed-size Pin
Nick Seng14-Apr-03 23:53
Nick Seng14-Apr-03 23:53 
GeneralRe: Generating random number of fixed-size Pin
Nick Seng14-Apr-03 23:43
Nick Seng14-Apr-03 23:43 
GeneralRe: Generating random number of fixed-size Pin
Gerry15-Apr-03 0:15
Gerry15-Apr-03 0:15 
GeneralC# and excel Pin
Marix14-Apr-03 20:37
Marix14-Apr-03 20:37 
GeneralRe: C# and excel Pin
Nick Seng14-Apr-03 23:38
Nick Seng14-Apr-03 23:38 
GeneralRe: C# and excel Pin
Chris Austin15-Apr-03 5:16
Chris Austin15-Apr-03 5:16 
GeneralPowering through statements Pin
Adam Turner14-Apr-03 14:28
Adam Turner14-Apr-03 14:28 
GeneralRe: Powering through statements Pin
Jim Stewart14-Apr-03 17:43
Jim Stewart14-Apr-03 17:43 
GeneralRe: Powering through statements Pin
Adam Turner14-Apr-03 17:49
Adam Turner14-Apr-03 17:49 
GeneralRe: Powering through statements Pin
Jim Stewart14-Apr-03 18:07
Jim Stewart14-Apr-03 18:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.