Friday, December 28, 2007

How to disable Exchange Security Policy for Windows Mobile Devices

Direct Push pushes email into your Windows Mobile device and it's good. However it pushes you security policy as well, that sometimes make you unable to set password that you want and sometimes, lock your device after one minute of inactivity. How to disable this useful feature? How to cancel autolock feature of your WM machine, connected to Microsoft Exchange server?

As everything in WM, you should patch registry, but what to patch? Well, it's simple

  • Enable/Disable the Exchange security policy - HKLM\Security\Policies\00001023: 0 = Enabled; 1 = Disabled
  • Inactivity time
    • HKLM\Comm\Security\Policy\LASSD\AE\{50C13377-C66D-400C-889E-C316FC4AB374}\AEFrequencyType: 0 = No inactivity time; 1 = Activity time enable
    • HKLM\Comm\Security\Policy\LASSD\AE\{50C13377-C66D-400C-889E-C316FC4AB374}\AEFrequencyValue: number of minutes before timeout
  • Password strength
    • Minimum number of characters: HKLM\Comm\Security\Policy\LASSD\LAP\lap_pw\MinimumPasswordLength
    • Password complexity: HKLM\Comm\Security\Policy\LASSD\LAP\lap_pw\PasswordComplexity: 0 = Require Alphanumeric; 1 = Require numeric (PIN); 2 = No restriction
  • Wipe settings
    • Number of failed attempts before all your information will go: HKLM\Comm\Security\Policy\LASSD\DeviceWipeThreshold: -1 = disabled; other failed attempts
    • Number of failed attempts before displaying codeoword: HKLM\Comm\Security\Policy\LASSD\CodewordFrequency: number of failed attempts

Well, that all. After you'll fix it, just go to Lock settings in your device manager and you'll be able to unmark and change whatever you want. I hate, when program denies me from doing anything in my device.

If you are not feeling comfortable with changing registry settings, I create simple program, that do it instead of you. You can download and use it for free, but notice, I'm not responsible if it will brick your device (this is system hack)

image

Download Exchange Police Patch >>

Friday, December 21, 2007

Learning marathon - December 23-29

Do you want to know WPF, Silverlight or it's architecture or appliance and you are in Israel next week? If so, please keep reading. Next week (Dec 23-29) it's going to be a lot of workshops, courses and other learning attractions, related to those technologies.

  • 24-Dec [4:00PM-8:00PM] - Architects user's group "Architects Forum Meeting - User Experience - Architecture and Technologies Dillemas" in Microsoft Israel (2, haPnina str, Ra'anana). The place to discuss with me + light dinner
  • 25-Dec [9:30AM-4:30PM] - "WPF training for designers" in Sela college (14, Baruch Hirsh str., Bnei Brak). If you are designer and want to stop getting rejects from developers, you should attend. You'll learn how to use efficiently Microsoft Expression tools and begin to designing real applications. What's in agenda?
    • What is UX? (Developers are strange nation)
    • Expression Design (It’s not Adobe)
    • Expression Blend (We do not need those strange designers)
    • Windows Experience (Visual Studio is old and bad tool)
    • Hands On Labs (Let’s make it work)
  • 26-Dec [8:30AM-1:30PM] - "Microsoft technologies appliance in C2 and military systems" in Microsoft Israel (2, haPnina str, Ra'anana). You'll hear about real world real time and near real time applications, command and control systems, and using WPF, Silverlight, Windows Server and .NET technologies to build them. If you are working in military industry - you have to attend. Lunch and dinner included.
    • Modern C&C systems, using new technologies (me)
    • mCore as C2 framework (Eli Arlozorov)
    • Israel Navy as C2 and WPF successful case study (Lior Rozner)
  • 27-Dec [9:30AM-4:30PM] - "Silverlight training for designers" in Sela college (14, Baruch Hirsh str., Bnei Brak). If you are designer and want to start writing Silverlight applications, you should attend. One day session to start work in Silverlight, by using Microsoft Expression suite. Agenda
    • How to start project (developers understand nothing)
    • Prepare assets (make developers not interrupt you)
    • Expression Blend how to (if I know Adobe, I already know it)
    • Make it moving (Adobe Flash is my friend)
    • Make it play (You are producer)
    • Fundamentals (make you understand developers)
    • How to finish project (developers understand nothing)

Not bad, ah? You should register @ Microsoft [send me an email if you have registration problem] to attend any of those events (it's free, if there are places). See you there and have a good weekend.

Wednesday, December 19, 2007

Anonymous types sharing or why it's still sucks?

Did you try to cast anonymous types (vars)? You are. However, you never was able to pass var from one method to another. Why is it? Cos, anonymous type got known in context of current method only. Well, we always can cast one anonymous type into other. How? By using Extension methods. Let's make small repro. In one method, you have following structure

var myVar = new[] {
               new {Name = "Pit", Kind = "Alien},
               new {Name = "John", Kind = "Predator"},
               new {Name = "Fred", Kind = "Human"}
           };

In other method, you have other variable

var theirVar = new[] {
                new {Name = "Kent", Kind = "Alien"},
                new {Name = "Rob", Kind = "Predator"},
                new {Name = "Bill", Kind = "Human"}
            };

Cool. Now you can cast myVar easily into object or object array, and transfer it into other method. Then, cast theirVar into another object or object array and cast myVar into theirVar, right? Why not to use extension to make your live easier (tnx to AlexJ)?

public static class Extender
   {
       public static T Cast<T>(this object obj, T what)
       {
           return (T)obj;
       }
   }

Now, it's very cool part. Change theirVar assignment to following:

var theirVar = myVar.Cast(new[] {
               new {Name = "Kent", Kind = "Alien"},
               new {Name = "Rob", Kind = "Predator"},
               new {Name = "Bill", Kind = "Human"}
           });

You got theirVar type of myVar type. Isn't it cool? You even can enumerate through those objects, by using strong types

foreach (var q in theirVar)
            {
                Console.WriteLine("{0}-{1}", q.Name, q.Kind);
            }

Well, as always, I have a goat for you. Let's change myType as following

var myVar = new[] {
               new {Name = "Pit", Kind = "Alien", Goat = "bee"},
               new {Name = "John", Kind = "Predator", Goat = "mee"},
               new {Name = "Fred", Kind = "Human", Goat = "eee"}
           };

And we will not tell to theirType developer about what type Goat member is. So, we let him write

var theirVar = myVar.Cast(new[] {
                new {Name = "Kent", Kind = "Alien", Goat = 1},
                new {Name = "Rob", Kind = "Predator", Goat = 2},
                new {Name = "Bill", Kind = "Human", Goat = 3}
            });

Eaht! Will it works? Sure, if exceptions will be handled. Actually, you'll get

Unable to cast object of type '<>f__AnonymousType0`3[System.String,System.String,System.String][]' to type '<>f__AnonymousType0`3[System.String,System.String,System.Int32][]'.

Extremely informative exception (if you know what <>f__AnonymousType0 is). Isn't it? Don't use anonymous types. It's bad behavior! Have a nice day and be good people.

Tafiti goes open source (well, actually, shared source under MS-PL)

All those, how want to implement data visualization in Silverlight (as Tafiti does), can look into this CodePlex project and use it for your own. Notice, you can download, modify and, even, resell this code, due to fact, that it's under MS-PL shared source licence. Well done, Live team.

Tuesday, December 18, 2007

Messed with Silverlight video player skin, generated by encoder? See how to customize it

Have you ever try to create your own video player skin, by customizing one, generated by Microsoft Expression Media? If you not really familiar with Silverlight development, it's rather hard to do. Microsoft recognizes it and recently released special document about Silverlight Media Player skin customization. It's very useful for you, if you do not want to begin learn Silverlight internal, however, you want to create your own player skin fast. Here it is (direct link). You'll need BasePlayer.js debug version as well, so download it here.

image

Silverlight for LOB? Here it is

Are you asking for case studies of LOB (line-of-business) application, written in Silverlight? Nothing simpler. Here is the result of the partnership between Microsoft and Infusion. Another great Penza and Airport type RIA (rich-internet-application)

Monday, December 17, 2007

WPF for developers from Dev. Academy 2 - recordings

If you was unable to attend Developers Academy 2 and still want to see sessions there, you are more, then welcome to do it. Here link to the recording of my session. And here is the presentation. The quality of the recording is awful, as well as whole hosting site quality. It seemed like "Gisha Hadasha" has no QA and particle employed student to make sites. However, if you still want to see the screencasts of the sessions, go there.

image

See screencast "WPF for developers (or optimizing your WPF application)" >>