# Friday, May 28, 2010

PrintDialog not working on Windows 7

Updating a program of mine I noted that when I called the PrintDialog and passed it my PrintDocument (or variant thereof), I did not get any said PrintDialog.

Long story short - you just set the UseEXDialog to true:

PrintDialog _printDialog = new PrintDialog();
_printDialog.UseEXDialog = true;

See http://msdn.microsoft.com/en-us/library/system.windows.forms.printdialog.useexdialog.aspx for more info

# Monday, May 03, 2010

Unable to map drive in Windows 7

While trying to map a drive to an older server in w07 it informed me that the network password was wrong, even though I KNEW it was correct.

After a lot of hunt and peck I came across the issue - basically by default it refuses to transmit the login except in the highest format (NTLM v2). Which makes sense, and is undoubtedly documented somewhere. EXCEPT IN THE ERROR THAT IS RETURNED! I mean it might at least give a hint rather than just rejecting the password.

Solution (demonstrated just on a local box but this can also be done via a domain Group Policy): go into your Local Security Policy.

Go into Security Settings/Local Policies/Security Options and go down to "Network Security: Lan Manager authentication level"

Set it to "Send LM & NTLM - use NTLMv2 session security if negotiated". This will give you backward compatibility.

Of course, the real solution is to move everything to NTLMv2...