Configuring Outlook 2010 on BPOS to work with multiple exchange accounts

Instructions are modified from

I’ve been looking around all over for a way to configure multiple exchange accounts to work with Outlook 2010. The official word is that “Outlook 2010” isn’t supported by BPOS yet, and it’s left at that. One of the fortunate things about working for a company like InterKnowlogy is that we often have the liberty to experiment with and use non-standard or un-supported technology on a regular basis. Here’s the exact steps to setup Outlook 2010 on Windows 7.

Note that you will no longer be using the BPOS client to start outlook, and these instructions are for Outlook 2010 on Windows 7 only.

Server Information (Do this for each BPOS email account)

  1. Login to Outlook Web Access.
  2. Click on Options in the top right hand corner.
  3. Click on About in the navigation bar on the left.
  4. Find the entry for Mailbox server name and write it down or record it as you will be using it later.
  5. Log out of Outlook Web Access.

Create an Outlook Profile

  1. Make sure you have Outlook 2010 installed.
  2. Open the Control Panel.
  3. Click User Accounts
  4. Click Mail.
  5. In the window that pops up, click Show Profiles.
  6. Click Add.
  7. Enter a new name for the profile. i.e. Your email address
  8. Click OK.
  9. Click Manually configure server settings or additional server types.
  10. Click Next.
  11. Select Microsoft Exchange.
  12. Click Next.
  13. Enter the mailbox server name (that you wrote down or copied from the previous section) in the field Microsoft Exchange server.
  14. Enter your full name in the field User Name.
  15. Click More Settings.
  16. If you are prompted with an error that the action cannot be completed, click OK.
  17. Click Cancel.
  18. Click on the Connection tab.
  19. Select Connect to Microsoft Exchange using HTTP.
  20. Click Exchange Proxy Settings.
  21. Enter the mobile device URL for your region.
  22. Make sure the On fast networks, connect using HTTP first, then connect using TCP/IP is checked.
  23. Click OK.
  24. Click OK.
  25. Click Check Name.
  26. Enter your User Name and Password.
  27. Click OK.
    2. Click More Settings.
    3. Click the Security tab.
    4. Make sure Always prompt for logon credentials is checked.
  28. Your profile should now have resolved and the correct Microsoft Exchange server should be displayed.
  29. Click Next.
  30. Click Finish.

Add an Account to Your Outlook Profile

  1. If the mail dialog is not open, repeat steps 2-5 under Create an Outlook Profile
  2. Select the profile that you want to add an account too.
  3. Click Properties.
  4. Click E-mail Accounts.
  5. Under the E-mail tab, click New.
  6. Repeat steps 9-30 under Create an Outlook Profile.
  7. Repeat steps 5-6 for each e-mail account you want to add.
  8. Open Outlook 2010.
  9. Enter credentials for each account and check the remember option(make sure that the Username and password are correct for the account it is asking you for. THEY ARE DIFFERENT)
  10. Once Outlook is started…
  11. Click File in the top left corner.
  12. Click Account Settings.
  13. Click Account Settings in the dropdown.
  14. For each account under e-mail:
    1. Select the Account.
    2. Click Change.
    3. Click More Settings…
    4. Click the Security tab.
    5. Un-check Always prompt for logon credentials.
    6. Click Ok.
    7. Click Next
    8. Click Finish
  15. Click Close

Known Issues

  • If you are NOT using the BPOS client anymore you may not get notifications to change your password.
  • Calendars will show up with an error of “No Connection” you will have to send a sharing request to see their calendar.

Native Glass Windows with WPF in Windows 7 / Vista

One of the awesome benefits of working at InterKnowlogy is that we get time to do what we call RECESS: Research and Experimental Coding to Enhance Software Skills. It’s a 4 hour time span where we can work on interesting technologies to enhance, grow, and keep up on the latest technologies and methodologies. It keeps us sharp, interested, and many of our demos have come from these short code jams.

Over the past few weeks I’ve wanted to figure out how to add or extend glass into my application like you see in Word (2010 preview):


As you can see, the whole title bar area is seamlessly integrated into the look and feel of windows, it feels native, its got that cool semi-transparent blur-the-background effect and everything. So come RECESS I did some research and pieced together what you’d need to get an effect like this.

  2. using System.Runtime.InteropServices;
  3. using System.Windows;
  4. using System.Windows.Interop;
  5. using System.Windows.Media;
  6. using Codelogic.Windows.Native.APIManagedExceptions;
  8. namespace Codelogic.Windows.Native
  9. {
  10. public static class DesktopWindowManagerAPI
  11. {
  12. public static void AllGlassWindow(this Window window)
  13. {
  14. ExtendFrameIntoClientArea(window, new Thickness(-1), false);
  15. }
  17. public static void ExtendFrameIntoClientArea(Window window, Thickness thickness)
  18. {
  19. ExtendFrameIntoClientArea(window, thickness, false);
  20. }
  22. public static void ExtendFrameIntoClientArea(Window window, Thickness thickness, bool exceptionOnFail)
  23. {
  24. var compEnabled = IsCompositionEnabled();
  25. if (exceptionOnFail && !compEnabled)
  26. throw new DWMNotEnabledException();
  28. if (exceptionOnFail && !window.IsInitialized)
  29. throw new WindowNotLoadedException();
  31. if (!compEnabled) return;
  33. var margins = thickness.ToDWMMargins();
  34. var windowPointer = new WindowInteropHelper(window).Handle;
  36. //convert the background to nondrawing
  37. var mainWindowHwnd = HwndSource.FromHwnd(windowPointer);
  38. if (mainWindowHwnd != null)
  39. mainWindowHwnd.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
  41. try
  42. {
  43. DwmExtendFrameIntoClientArea(windowPointer, ref margins);
  44. }
  45. catch (DllNotFoundException)
  46. {
  47. window.Background = Brushes.White;
  48. }
  49. }
  51. public static bool IsCompositionEnabled()
  52. {
  53. try
  54. {
  55. return DwmIsCompositionEnabled();
  56. }
  57. catch (DllNotFoundException)
  58. {
  59. return false;
  60. }
  61. }
  63. #region WPF to Native
  65. private static DWMMargins ToDWMMargins(this Thickness t)
  66. {
  67. var rtrn = new DWMMargins();
  69. rtrn.Top = (int)t.Top;
  70. rtrn.Bottom = (int)t.Bottom;
  71. rtrn.Left = (int)t.Left;
  72. rtrn.Right = (int)t.Right;
  74. return rtrn;
  75. }
  77. #endregion
  79. #region Native Interop
  81. [StructLayout(LayoutKind.Sequential)]
  82. private struct DWMMargins
  83. {
  84. public int Left;
  85. public int Right;
  86. public int Top;
  87. public int Bottom;
  88. }
  90. /// <summary>
  91. /// Extends an hwind's frame into the client area by the specified margins.
  92. /// </summary>
  93. /// <param name="hwnd">Integer pointer to the window to change the glass area on.</param>
  94. /// <param name="margins">Margins, what to set each side to</param>
  95. [DllImport("dwmapi.dll", PreserveSig = false)]
  96. private static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref DWMMargins margins);
  98. /// <summary>
  99. /// Checks to see if the Desktop window manager is enabled.
  100. /// </summary>
  101. [DllImport("dwmapi.dll", PreserveSig = false)]
  102. private static extern bool DwmIsCompositionEnabled();
  104. #endregion
  105. }
  106. }

Alright, lets begin breaking this down.

  2. [StructLayout(LayoutKind.Sequential)]
  3. private struct DWMMargins
  4. {
  5. public int Left;
  6. public int Right;
  7. public int Top;
  8. public int Bottom;
  9. }
  11. [DllImport("dwmapi.dll", PreserveSig = false)]
  12. private static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref DWMMargins margins);
  14. [DllImport("dwmapi.dll", PreserveSig = false)]
  15. private static extern bool DwmIsCompositionEnabled();

First, Windows 7 and Vista provide us with the Desktop Window Manager which was first included in Vista and continues on into Windows 7, it manages all the cool graphical windowing and effects you see in those operating systems. It also gives us an API dll to access these all the features, including many that are unavailable in WPF.

The first declaration you see sets up the data type that the DLL uses internally to represent Left, Right, Top, and Bottom glass margins. The others are pointers to unmanaged (non .NET) methods in the DLL. DwmExtendFrameIntoClientArea is the method that allows me to adjust how far in the glass extends in to the client drawable area, and DwmIsCompositionEnabled tells me if Aero Glass is enabled.

  2. private static DWMMargins ToDWMMargins(this Thickness t)
  3. {
  4. var rtrn = new DWMMargins();
  6. rtrn.Top = (int)t.Top;
  7. rtrn.Bottom = (int)t.Bottom;
  8. rtrn.Left = (int)t.Left;
  9. rtrn.Right = (int)t.Right;
  11. return rtrn;
  12. }

A simple extension method (denoted by the ‘this’ in front of the Thickness t, it allows me to write the declaration as though the method were part of the Thickness class, so if I have a thickness variable thick I could convert it to a DWMMargins type by writing var margins = thick.ToDWMMargins();) it converts a WPF Thickness object to the internal DWMMargins struct.

  2. public static void ExtendFrameIntoClientArea(this Window window, Thickness thickness)
  3. {
  4. ExtendFrameIntoClientArea(window, thickness, false);
  5. }
  7. public static void ExtendFrameIntoClientArea(this Window window, Thickness thickness, bool exceptionOnFail)
  8. {
  9. var compEnabled = IsCompositionEnabled();
  10. if (exceptionOnFail && !compEnabled)
  11. throw new DWMNotEnabledException();
  13. if (exceptionOnFail && !window.IsInitialized)
  14. throw new WindowNotLoadedException();
  16. if (!compEnabled) return;
  18. var margins = thickness.ToDWMMargins();
  19. var windowPointer = new WindowInteropHelper(window).Handle;
  21. //convert the background to nondrawing
  22. var mainWindowHwnd = HwndSource.FromHwnd(windowPointer);
  23. if (mainWindowHwnd != null)
  24. mainWindowHwnd.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
  26. try
  27. {
  28. DwmExtendFrameIntoClientArea(windowPointer, ref margins);
  29. }
  30. catch (DllNotFoundException)
  31. {
  32. window.Background = Brushes.White;
  33. }
  34. }
  36. public static bool IsCompositionEnabled()
  37. {
  38. try
  39. {
  40. return DwmIsCompositionEnabled();
  41. }
  42. catch (DllNotFoundException)
  43. {
  44. return false;
  45. }
  46. }

Finally I wrapped native methods with .NET versions that take a more useful WPF Window class and WPF Thickness class for the ExtendFrameIntoClientArea method. Internally it checks to make sure the window is initialized and that Desktop Composition is enabled, gets the integer pointer to the window, resets the background, and then calls the native method to extend the glass into the drawable (client) area of the window. Two custom classes not shown are the DWMNotEnabledException class and the WindowNotLoadedException class, which are thrown if something goes wrong.

That’s all well and good, but wouldn’t it be nice if we didn’t have to worry about all these calls to this custom DesktopWindowManagerAPI class and could just set how much we wanted the glass to extend into the client area? Or bind it to something so that the glass area expands or contracts when a value changes?

I thought so:

  2. using System.Windows;
  3. using Codelogic.Windows.Native;
  5. namespace Codelogic.Controls.WPF
  6. {
  7. public class GlassWindow : Window
  8. {
  9. #region Glass Thickness Dependency Property
  11. public static readonly DependencyProperty GlassThicknessProperty = DependencyProperty.Register(
  12. "GlassThickness", typeof(Thickness), typeof(GlassWindow), new PropertyMetadata(new Thickness(0, 0, 0, 0), GlassThicknessChanged));
  14. //when the thickness changes, apply the change to the window.
  15. private static void GlassThicknessChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
  16. {
  17. ((GlassWindow)d).UpdateGlassState();
  19. }
  21. /// <summary>
  22. /// Local property for Glass thickness.
  23. /// </summary>
  24. public Thickness GlassThickness
  25. {
  26. get { return (Thickness)GetValue(GlassThicknessProperty); }
  27. set { SetValue(GlassThicknessProperty, value); }
  28. }
  30. public static readonly DependencyProperty IsAllGlassProperty = DependencyProperty.Register("IsAllGlass",
  31. typeof(bool),
  32. typeof(GlassWindow),
  33. new PropertyMetadata(
  34. OnIsAllGlassChanged));
  36. private static void OnIsAllGlassChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
  37. {
  38. ((GlassWindow)d).UpdateGlassState();
  39. }
  41. public bool IsAllGlass
  42. {
  43. get { return (bool)GetValue(IsAllGlassProperty); }
  44. set { SetValue(IsAllGlassProperty, value); }
  45. }
  47. private void UpdateGlassState()
  48. {
  49. if (!IsInitialized) return;
  51. if (IsAllGlass)
  52. this.AllGlassWindow();
  53. else
  54. this.ExtendFrameIntoClientArea(GlassThickness);
  55. }
  57. static GlassWindow()
  58. {
  59. DefaultStyleKeyProperty.OverrideMetadata(typeof(GlassWindow), new FrameworkPropertyMetadata(typeof(GlassWindow)));
  60. }
  62. protected override void OnSourceInitialized(EventArgs e)
  63. {
  64. base.OnSourceInitialized(e);
  65. UpdateGlassState();
  66. }
  67. }
  68. }

Alright, this class creates a WPF Window subclass, adds a dependency property for GlassThickness and a change handler that internally calls the DesktopWindowManagerAPI.ExtendFrameIntoClientArea if the window is loaded or attaches an event handler if the window is not loaded. Now all you have to do is change your window class over to a GlassWindow class, set the thickness and you rock and roll!

  2. <WPF:GlassWindow x:Class="Codelogic.Controls.WPF.Demo.GlassDemoWindow"
  3. xmlns=""
  4. xmlns:x=""
  5. xmlns:WPF="clr-namespace:Codelogic.Controls.WPF;assembly=Codelogic.Controls.WPF"
  6. Title="Glass Window Demo"
  7. Height="300"
  8. Width="300"
  9. GlassThickness="10000">
  10. <Grid>
  11. <InkCanvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" />
  12. </Grid>
  13. </WPF:GlassWindow>

Glass Ink

Something I have not yet done that I would like to do is figure out how to add functional buttons into the title-bar of an application. If you remember the Microsoft Word snippet from above there’s save / undo / redo buttons in the title bar. But that will have to be a later post.

Hope someone enjoyed my Glassy exploration,


  • 2 Dec 2009
    • Changed ExtendFrameIntoClientArea to check to see if window.IsInitialized instead of window.IsLoaded
    • Updated GlassWindow to override OnSourceInitialized instead of adding an event handler for Loaded
    • Added in a method that turns the entire client area into glass by setting the margins to -1.
    • Changed Glass Window to have a Boolean Dependency property to turn it all glass.

– Paul Rohde

WCF Manual Service Hosing on Windows Vista and Windows 7

With the new security features introduced in Windows Vista and now in Windows 7 there are some, not so obvious, problems that have crept in and cause weird errors in even simple code. I was building a simple web service for the first time a simple HelloWorld in a console application to make it easy to debug and output trace information. Nothing complicated, a little different because I was configuring everything manually in code as opposed to using configuration file. Here’s the code for my simple, stripped down HelloWorld service:

  2. using System;
  3. using System.ServiceModel;
  5. namespace ConsoleServer
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. Console.Write("Server...");
  13. ServiceHost serviceHost = new ServiceHost(typeof(HelloWorldService),
  14. new Uri("http://localhost:9000/TestService"));
  16. serviceHost.AddServiceEndpoint(
  17. typeof(IHelloWorldService),
  18. new WSHttpBinding(),
  19. "");
  21. serviceHost.Open();
  23. Console.WriteLine("Started");
  25. Console.ReadLine();
  26. }
  27. }
  29. //operation contract
  30. [ServiceContract]
  31. public interface IHelloWorldService
  32. {
  33. [OperationContract]
  34. string HelloWorld();
  35. }
  37. public class HelloWorldService : IHelloWorldService
  38. {
  39. public void HelloWorld()
  40. {
  41. System.Threading.Thread.Sleep(1000); //sleep for one second
  42. return "Hello World Service";
  43. }
  44. }
  45. }

And the client:

  2. using System;
  3. using System.ServiceModel;
  4. using ConsoleServer;
  6. namespace Client
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. Console.WriteLine("Client");
  14. ChannelFactory<IHelloWorldService> myChannelFactory =
  15. new ChannelFactory<IHelloWorldService>(
  16. new WSHttpBinding(),
  17. new EndpointAddress
  18. ("http://localhost:9000/TestService"));
  19. IHelloWorldService wcfClient = myChannelFactory.CreateChannel();
  22. System.Threading.Thread.Sleep(3000);
  23. Console.WriteLine("Calling Hello World");
  24. for (int i = 0; i < 5; i++)
  25. {
  26. Console.WriteLine(wcfClient.HelloWorld());
  27. Console.WriteLine("- Called HelloWorld");
  28. }
  30. Console.WriteLine("Done");
  32. Console.ReadLine();
  35. }
  36. }
  37. }

The code is fairly straight forward as far as services go, running it however I began getting the following error:

HTTP could not register URL http://localhost:9000/. Your process does not have access rights to this namespace (see for details).

Extremely unhelpful, and the link provided by Microsoft offers no solutions (insert eye roll here) so I went off to consult Google… After a bit of research I discovered that it was the security features in Window 7 and Windows Vista that had been causing the problem, mostly because I’m trying to do everything manually in code some of the permission requests or other behind the scenes magic that normally occurs when Visual Studio 2008 creates and hosts a service from an application configuration file don’t happen. (My guess is that when visual studio installs it sets up permissions for Cassini, it’s inbuilt web server, and that when you run your service the ‘normal’ way that it automatically wraps your service in Cassini, effectively bypassing the normal application security measures, but that’s another story). Long and the short of it is that if you want to do this yourself you need to add some permissions to your user (by default even administrator accounts in Windows 7 and I *think* Windows Vista run in a restricted mode) to allow you to register your service with windows. (The original article is here)

Run a Command Prompt with Administrator privileges (Actually right click and select it), type and run the following command (replace the port number with whatever port you are using, 9000 for the code above, and your domain(or computername if your not on a domain) and username).

netsh http add urlacl url=http://+:8000/ user=DOMAIN\UserName

And *BAM* everything magically works. Cool huh?

– Paul Rohde

An Afternoon Installing Windows 7


widgetsiiWith Microsoft releasing the beta of their new Windows 7 I decided to go ahead, install in see how well it works and runs in school / development as a primary operating system. I’m currently on a Lenovo Z61p laptop that’s provided by our school with the following specs:

  • T7600(2.33GHz)
  • 2GB RAM
  • 100GB 7200rpm HD
  • 15.4in 1920×1200 LCD
  • 256MB ATI FireGL V5200
  • 802.11n wireless
  • Bluetooth
  • Modem
  • 1Gb Ethernet

Installation took about an hour and 30 minutes off of a burned dvd (x64 bit edition), about 2 restarts and about 5 minutes at the end to setup, provide user name and password, timezone, and so on. I was a bit worried that I would have issues connecting on the wireless but the drivers that came with Windows 7 were able to find all the networks right off the bat. That being said, there seems to be a slight issue when the wireless requires you to accept a security certificate, it continues popping up multiple times before it finally lets you enter your domain username and password (since my computer is not registered on the Neumont domain). Fortunately after just letting it pop up enough times it eventually let me enter my credentials and connected without a problem.

Next step was installing drivers. Lenovo offers a system update utility that runs, checks your system, shows what drivers and updates are available and will download and install the ones you select. Installed the updater, selected all the critical updates and some of the recommended updates, hit go, and it ran and installed everything without a hitch. The most notable update was for my graphics driver which allowed the Areo glass effect, oddly, it didn’t automagicly switch from the flat basic window manager to Areo, I had to go in and switch manually, but after that everything seemed to work fine, I haven’t had any BSOD (Blue Screens of Death) yet after about 4 hours of running it.

As was getting ready to start installing the software I use, I began having some issues installing Alcohol 52% (For those of you who don’t know, Alcohol 52% allows you to create a virtual cd/dvd drive and access .iso and other files as CD’s or DVD’s), after doing a bit of research it seems that Alcohol and Daemon tools both have some issues with Windows 7 and the way they install and register the virtual drive. Currently I’m playing with Virtual Clone drive which seems to working well so far, I did get a BSOD when I tried to restart my computer, but it has worked fine after that. Other than that virtual clone drive has been working fine mounting and demounting all the iso’s I have of my software. Most everything has installed correctly, including SQL server 2008, Visual Studio 2008, Netbeans, Glassfish v2, Java EE, Expression Studio, Microsoft Office, Digsby and so on.

Windows 7 has a large number of interface improvements, seems to be a bit faster and runs with a smaller memory footprint than vista, and is most of all backward compatible with previous vista drivers which is one of the big reasons I believe that it will surpass vista in popularity. I for one am really looking forward to the final release near the end of this year.

– Paul Rohde