Re: Printing Issue



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.
>


.



Relevant Pages

  • Re: Printing Issue
    ... 0x400 that caused Winform PrintPreviewControl throw the exception. ... 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 ...
    (microsoft.public.dotnet.framework.windowsforms)
  • power user group
    ... My guess is the permission in the registry. ... >We have a windows 2000 advanced server that is running ... I tried with a test account that just had ...
    (microsoft.public.win2000.security)
  • Re: System.Security.SecurityException was unhandled
    ... The exception gave you the CLSID. ... the first thing to check might be whether the COM server ... assembly actually has the permission in question. ... When I execute the application I received and error message. ...
    (microsoft.public.dotnet.security)
  • Security Exception on 1&1 with SQL Server
    ... I have put the bin directory in the /gallerox folder as I have a re-director ... However, when I try to access the default.aspx page, I get back a security ... exception which is detailed at the bottom of this post. ... To grant this application the required permission ...
    (microsoft.public.dotnet.framework.aspnet)
  • SerialisationException: Request for the permission of type failed.
    ... I'm getting a serialisation exception with an inner permission error ... TSI.DRICE.Interfaces (available to both client and server). ... t for the permission of type TSI.DRICE.Interfaces.EngineTypes failed. ... (Stream serializationStream, HeaderHandler handler, Boolean fCheck, ...
    (microsoft.public.dotnet.framework.remoting)