Question

Locked

How to cause a printer timeout?

By Slayer_ ·
Ok, this is a strange one, occasionally some clients, will have broken printers installed. These printers, will cause obnoxious timeouts, usually first when you try to select the printer in the control panel, then another timeout when you right click it or try to open the propertiese, usually 2 more timeouts to delete it.

This is my concern because one of my programs processes is to ask the system what printers it has installed. The problem being is it will hang until it times out for each broken printer. So far it amounts to about 15 minutes per printer.

I have written code to "give up" on printer checking if it takes longer than 2 minutes. However I cannot test this code as I cannot reproduce the problem here at work.

So far I have tried changing my printers share name, my printers physical name (Which caused it to break, but was instant, no timeout).

I have simply tried unplugging the network cable, and even just turning the printer off (Unplug), and mysteriously I can still open the propertise of the printer and still access it as if it's fine. I tried changing my permissions on the server so that my user had no permissions, I just get permission denied and it STILL let's me view the printer propertise.

My next idea was changing the IP address, but I suspect that will just cause it to immediatly report the printer not found.

Any other ideas anyone?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Break your printer

by Tony Hopkinson In reply to How to cause a printer ti ...

no paper, paper jam, no toner / ink etc?

Loks like control panel is just skipping over known faults though such as disconnected.

If will give your boss the heebies, but if you can't break you new version it's no worse than waht you have so you just release it but don't tell the customners the issue is fixed and see if the calls go down.

I'd consider adding something log, event, handled exception or some such to record that the timeout occurred as well.

Sometimes in customer set ups, you just have to wait for the 'aha' clue, or if that's unacceptable, change the way you do things, so it can't be an issue anymore.

Collapse -

hmm good point

by Slayer_ In reply to Break your printer :p

I should log when the "Give up" happens, but it's not that critical.

Really all the code does is enumerate your printers and checks if you have the correct printers installed. If missing, it installs them.
It's the enumeration that hangs. It's amazing how long it hangs for.

Collapse -

Call back from the API, or WMI?

by Tony Hopkinson In reply to hmm good point
Back to Networks Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums