Re: Printing Issue
- From: "Alex Clark" <quanta_xp@xxxxxxxxxxxxxxxx>
- Date: Tue, 13 Sep 2005 11:38:08 +0100
Hi Jeffrey,
No problem about the delay, thankyou for following it up :-)
I'm still not convinced that this is exclusively a default printer issue.
As stated in one of my previous posts, I was able to log in as user "B"
after adding printers as user "A", and set one of the printers that were
already there to be my default - however, the test application still
crashed. It was only when I added my own printer in while logged in as user
"B" and setting that as the default that I could actually print.
>From my tests it seems that even if you have a default printer, unless you
have ownership of some form over it you will still get the same problem.
Also, I assume MS are still treating this as a bug? I'd hate to see my app
crash simply because there is no default printer available! I'm already
testing for the presence of printers beforehand, but of course the Printers
Collection always returns the number of printers installed on the system -
not the number of printers *available* for use. Surely the framework should
at least be reporting a meaningful error message and giving you the option
to test for a default accessible printer beforehand? And surely it
shouldn't crash when displaying the Print Preview - before anything is even
sent to the printer!
Kind Regards,
Alex Clark
""Jeffrey Tan[MSFT]"" <v-jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:DR%23h$D2tFHA.780@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi Alex,
>
> Sorry for letting you wait for so long.
>
> I have contacted the bug owner for this issue. Yes, they have confirmed
> that my troubleshooting way is correct, it is PrintDlg API fails with
> Flags
> 0x400 that caused Winform PrintPreviewControl throw the exception.
>
> However, the root cause for the problem is still that there is no default
> printer for the test account. We can do the test like this:
> 1. Do your repro logged in as "A" and using Run-As "B"
> 2. Now log out of the machine and re-log in as "B"
> 3. Add a new printer and set it as the default (there should be no
> current
> printers other than possibly a fax "printer")
> 4. Now log off and back onto "a"
> 5. Redo your repro and you will see that it works.
>
> This shows that once another account has the printer installed, no
> exception will generate.
>
> In the test on my side, if we enable ManageDocument permission on the
> printer, even more, if we unchecked this permission, for "test account"
> the
> problem will not arise anymore, it seems that turning on this permission
> triggered certain flag in the system.(I am not sure if you notice this,
> but
> this is the test result in more thatn 3 machines on my side)
> From our product team, they say that this implies that its not really a
> security issue. Whats most likely happening is that by enabling
> ManageDocument permission on a certain printer -- you are exposing that
> printer to the other accounts -- thereby creating a default printer. Then
> when you disable the permission, it doesn't actually matter since you
> created the printer.
>
> So, we suggest the following KB, which shows how to add default printer
> for
> all new users:
> "How to Add a Default Printer for All New Users"
> http://support.microsoft.com/default.aspx?scid=kb;en-us;252388
>
> Hope this makes sense to you. Thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>
.
- Follow-Ups:
- Re: Printing Issue
- From: "Jeffrey Tan[MSFT]"
- Re: Printing Issue
- References:
- Printing Issue
- From: Alex Clark
- Re: Printing Issue
- From: Collin Bennett
- Re: Printing Issue
- From: Alex Clark
- Re: Printing Issue
- From: "Jeffrey Tan[MSFT]"
- Re: Printing Issue
- From: Alex Clark
- Re: Printing Issue
- From: "Jeffrey Tan[MSFT]"
- Re: Printing Issue
- From: Alex Clark
- Re: Printing Issue
- From: Alex Clark
- Re: Printing Issue
- From: "Jeffrey Tan[MSFT]"
- Printing Issue
- Prev by Date: Re: Microsoft VSTO
- Next by Date: How to draw text that will fill a panel(form, etc.)
- Previous by thread: Re: Printing Issue
- Next by thread: Re: Printing Issue
- Index(es):
Relevant Pages
|