February 26, 2008

Forms Server: Invalid Canary for view file

Problem:
We have two Web Applications both containing one Site Collection. We have a custom InfoPath form in Forms Server and the form is activated on both site collections.

After the lunar eclipse, the form on the second site collection refused to work, giving an error on the browser:
"There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."

In MOSS log you can find interesting errors such as:
  • "The Canary data been tampered with for form [FORM GUID]:ver:[VERSION]"
    • Where [FORM GUID] is the GUID and [VERSION] is the version of your defective form
  • "WARNING: Invalid Canary for view file."
Thoughts:
Form works fine on both site collections when using Firefox. When using IE, the other site collection's form does not work.

Solution:
Clear IE browser cache.

February 15, 2008

New version of Facebook Status application, 0.2.1

Hooray! To celebrate the launch of the application I bought myself a beer and enjoyed it on front of Visual Studio 2008. I know - it is kind of naughty, as it is only Thursday today. Or was...

Anyways, finished working with the application for tonight and uploaded a new version, 0.2.1, here.

At some point I'll maybe learn the WiX secrets of minor/major upgrades so that the MediaState won't have to be reinstalled every time as it is the one that requires the two Vista restarts. So for now just sit back and relax and think of the summer, which is apparently on its way, while waiting for the restarts to complete.

Changes:
  • Supports Facebook infinite sessions
  • Status updating may be enabled/disabled for each media type separately.
    • Currently this is done by modifying registry values (EventsEnabled_...) in HKLM\Software\HamarData\FBMCE or HCL\VirtualStore\Machine\Software\HamarData\FBMCE.
There were some strange behavior regarding the VirtualStore as I only learned about it a few hours ago, but as far as I know, you should find the registry values in the VirtualStore hive.

Coming soon...which will be after my winter holiday in few weeks: Ability to filter out certain Status updates (with RegExp) based on the title of the media...:P

February 12, 2008

Media Center Add-In for updating Facebook Status

I was at TechEd EMEA in Barcelona for the first time in 2007. Although I've been lately working a lot with MOSS 2007, I tried not to go on too many MOSS sessions. Instead I enjoyed some excellent MS Robotics Studio, Silverlight, XNA, Media Center sessions.

On the Media Center session I learned how to make simple add-ins to the new Media Center that comes with Vista. Of course, it all seems so easy when you're looking at a practiced session. In practice there were several issues I ran into.

Nevertheless, here it is: a Vista Media Center Background add-in that updates your Facebook user status according to what you're watching/listening on Media Center. So, if you're watching a program called "News" on Media Center, soon your Facebook status will say "...is watching News". In the same way the DVD, Recorded TV and Video title is shown. If you're watching pictures status will just be "...is watching pictures". When listening to music status will be "...is listening to ARTIST - TITLE".

Add-in checks Media Center MediaState every 10 seconds and only connects to Facebook and changes the status if change in MediaState is detected. It also handles the Extended Permissions situation as users need to give the application permissions to update user status. Add-in uses Facebook.NET libraries for most of the Facebook related operations.

Extenders are not currently supported since Facebook login must be done using a specific URL and even if I would create a separate Add-In to take care of the login (instead of using Windows Forms) I couldn't have any browser control in that add-in (in MCML). This thing is subject to change as I investigate the other ways to accomplish this.

Please give it a try and let me know what you think. If you have questions and/or problems, please post them in Facebook so that they'll be in one place.

Requirements
  • Vista Home Premium or Ultimate
  • .NET Framework 2.0

Quick instructions
  1. Install using setup.msi, restart is required
  2. Start Media Center
  3. Separate Windows Forms window is opened where you must login to Facebook.
  4. If this is the first time running the add-in a notification is shown that you have to give the Extended Status update permissions
  5. Extended permissions Windows Forms window is shown. Grant the permission, and close the form.
  6. Add-in runs in background updating your Facebook status.
Later when Media Center is started, only Facebook login is required (if you haven't checked the persistent login checkbox).

Facebook application page is here. See the front page of my blog for latest version information of the AddIn.

February 8, 2008

MOSS: Compressing MOSS log files

Problem:
I needed to e-mail a 62 MB MOSS log file to MS support. Yeah, there were in fact some problems in our MOSS installation?!

Knowing that RAR (which I prefer for the reasons you will soon find out) wasn't necessarily available for MS support personnel and that you can't open packages made with newer WinRAR with older versions of WinRAR, I was polite enough to ZIP the log file. A relatively good compression ratio of 13%, so the file was about 8,5 MB, not bad.

Well, of course our Exchange server bounced the mail back complaining about the size of the email (which was near but under 10 MB, so I don't even dare to guess how low the limit on the server really is).

Well, I first opened a new e-mail message window and started writing a complaint to our IT Support so that they'd increase the e-mail size limit, but being a nerd I decided to try compressing the file with RAR as I've had good experiences using it.

Solution:
Guess what, with RAR, the compression ratio was 0% and file size 561 KB! I've been impressed several times with RAR's compression ratio, but I believe this one is something I have to tell my grandchildren (one day) about.

I don't think WinRAR uses the latest version of ZIP, so this comparison is not probably a fair, but as I only want to use one software for my compression needs, it is fair comparison for me.

Some proof:
These screen shots show the files when Best compression ratio was used in both RAR and ZIP.

ZIP, 8,6 MB:

RAR, 0,56 MB