Monday, February 15, 2010

How to completely stress your end users

I’m supporting one of our partners in filling out some forms for getting our software certified with Microsoft. Upon creating a user account on the designated site for that, we are presented with the following passwordrules:

Password Requirements: Contain 8 - 16 characters with both upper and lower case (e.g., a-z, A-Z). Have digits and punctuation/symbol characters as well as letters e.g., 0-9, !@#$%^&*()_+|~-=\`{}[]:";'<>?,./). One or more of the characters from the second (2) to sixth (6) positions must not be an alphabet character e.g. between A-Z or a-z.

Are the *COMPLETELY* insane? We have to read this 20 times to even begin to understand what is asked from us.

I love Microsoft, but this is crazy.

Bye,

Bart

Saturday, February 13, 2010

Having Outlook 2007 and Outlook 2010 coexists next to each other

Update: it does look that Outlook 2010 touches the seperate profile after all, even without starting. First time the profile is created fine, subsequent launches of Outlook fail. So, maybe there is a reason for not allowing 2007 next to 2010. So, scratch all below :-(

When installing Office 2010 you get an message that Outlook 2010 and Outlook 2007 don’t mix together. I subesequently removed Outlook 2007 as I had worked with Office 2010 before and with great pleasure.

However, for development purposes I had to install Office 2007 again. I noticed that Outlook 2007 installs fine.

I took a precaution to create a separate profile for both versions (starting Outlook 2007 with a command line switch /profile to select the correct profile).

So far, it looks like there isn’t a problem to be found. It might be that me having an Office 2010 64 bits version and a 32 bits Office 2007 version make them coexist. But, it looks like it runs fine, which I really like since the Microsoft CRM client doesn’t support the 64 bits version of Office.

Hope it helps anyone.

Bye,

Bart

Thursday, December 03, 2009

Visual Studio keeps crashing on me

I’m experiencing a very annoying thing in VS. Every 1 in 10 (or so) builds of my project makes VS crash. I started Visual Studio in WinDbg and this is the last exception thrown before VS dies:

(1460.1288): CLR exception - code e0434f4d (first chance)
ModLoad: 5e0a0000 5e0bb000   C:\Windows\Microsoft.NET\Framework\v2.0.50727\alink.dll
ModLoad: 11da0000 11daa000   cvtres.exe
eax=000000c0 ebx=123aeba4 ecx=19074c30 edx=000641d3 esi=00000001 edi=00000000
eip=76e764f4 esp=123aeb54 ebp=123aebf0 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
ntdll!KiFastSystemCallRet:
76e764f4 c3              ret

 

If anyone has a clue what’s up, please let me know. Your help is much appreciated.

Bye,

Bart

Sunday, November 22, 2009

Twitter to the rescue

Since I can remember I am annoyed by the site expert-exchange.com. It might hold good information, but I just don't like the idea that people are making money the way they do. Might be my tight Dutch ass, but there you have it.
So, I mentioned this on Twitter and, voila, @bruljaap came to the rescue with a link that solved it.

How to exclude a domain from your google search results:

Thanks Jaap.

You can now search Google, exclude expert-echange.com, using the Bart's search on my blog. It not only excludes expert-echange, but also favors stackoverflow.com.

You can make the search engine the default in Google chrome by adding the following URL as a search engine using the options:


I'm sure you can create a search provider for Internet Explorer the same way (but I'm really becoming a Chrome addict lately so I will dig into that later).

Hope this helps.

Bye,
Bart

Friday, November 06, 2009

Problem with Outlook plugin and WebBrowser

Below you find a question (and my own answer to it) on StackOverflow. It has given me headaches for the last couple of days. But maybe this story will help others.

Hi, I've created a couple of Office plugins. The plugin shows a set of html files installed on the clients computer. The plugin uses a COM-accessible assembly which shows a WinForm with a WebBrowser on it. The plugin makes the WebBrowser navigate to a file on the clients computer. The assembly is also used in other programs to show the same information.

When showing the local html files using a 'normal' browser (e.g. double clicking a file in Windows Explorer) the browser popup a security warning about running active content. This is because we have some javascript in it. This warning is supressed by setting the 'Allow active content to run in files on My Computer' in the Internet Explorer settings. This solves the issue using a 'normal' browser.

Funny enough the 'active content' warning is not shown when getting the same file using a Word/Excel/PowerPoint plugin. It calls the same assembly, using the same WinForm and using the same content. Despite the setting 'Allow active content to run from My Computer' being false, the content is shown without a warning and the javascript is executed.

Now, the problem and the real question is that Outlook does the reverse. No matter what I use for 'Allow active content to run from My Computer' the browser warning about the active content in the html file is shown. When I confirm the message and allow the scripts to continue, the javascript runs fine. So, even when I set the 'Allow active content to run from My Computer' to true, the warning is given.

I've gone through all (sort of) relevant settings in Outlook, but nothing helps.

I assume that Outlook is using some kind of private context for a webbrowser (probably because it is using a webbrowser object internally).

The real question is: how can I make the Outlook plugin respect the IE settings?

(I understand this is a long story and maybe not clear enough. Please let me know if I have to elaborate more).

1 Answer

I couldn't get rid of the security warning without lowering the security setting. And that is not an option: we are talking about a project that will be installed on millions of computers.

I decided to go another route. Let's see if we can make the browser trust the html pages. So, what to do to get rid of the 'Active content' warning.

First I investigated what exactly triggers the warning. That was easy: any tag in your html file will do. And I need script, so removing that isn't an option. But, when hosted from a website, the scripts run fine and don't suffer from a warning. So, I investigated if it is possible to run my files in the Internet-context.

I found out there is a way, at least for IE (which in my case is sufficient). If you save a webpage as a complete HTML file from IE, the browser adds a comment to the html to signal its origin. Something like: . If you later open that stored html file, the file is shown in the Internet context.

So, I tried adding to the html file. And, voila, the file is opened in the Internet context. The security warning about active content is gone and the scripts are executed fine.

But, that raised another problem. We have a couple of window.open statements in the scripts and using that causes he cross domain browsing problems that in recent IE versions are blocked. Even if you use a relative path in the window.open call, if fails and you end up with a blank window.

In our case, we can (probably) decide to get rid of the window.open calls. But, if a reader ever finds a solution for using window.open

Hope this helps anybody,

Bye Bart

Monday, October 19, 2009

Summing up my experiences on Surface / WPF in the last few months

As you may have read on my blog, I’m a self taught software developer that started many moons ago with assembler and basic. Using Clipper, Cobol, Fortran, Smalltalk, C, C++ as substations I ended up being a Delphi developer for some 8 years (and I still use Delphi).

About a year ago we started an endeavour with Microsoft Surface. It is hard work to get some commercial success (companies are very tight at the moment with their budgets) but still we spend a lot of time getting some things together. We delivered a couple of applications to customers, one large application to one of our partners and even a shrink wrapped Surface product that will be sold through our partner LearningGuide Solutions.

Some time ago I complaint about my struggle to grasp the concepts behind WPF. I can easily say that’s all water under the bridge now. I am fully enjoying WPF/Xaml because of its elegant design and complete separation of code and visuals. Sometimes you need to go into the code behind (or at least you think you need to). Most of times you discover later on that there are more possibilities with the data binding, templates, styles, template selectors and value converters that you thought possible.

I would like to advise every programmer that is looking for some sharper looking applications to dig into WPF/Xaml. It can’t do more than other concepts can, but it will enable you to divide responsibilities amongst your software team members a bit better. At least, that’s what I take from it; our UX designer is now more in his field and programmers can concentrate on code even more, taking advantage of each others strengths.

Keep your eyes open for some Surface announcements later on.

Bye for now,

Bart

Saturday, September 12, 2009

Merging dictionaries in Silverlight 3

In Silverlight 3 you can merge dictionaries. Something that I really like because it enables you even better to separate reusable things from one time things.

When you try to do that, watch for a couple of things.

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/S7Silverlight;component/Themes/Generic.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Don’t forget: (1) the slash before the name of the Assembly and (2) to put component/ before the path to the resource file in the assembly

Just thought it might save you the hour I just spent.

Bye,

Bart