Dec 16 2009

My PDC Portrait

Category: Technology, Touch Screen ComputingAdam Toth @ 3:05 pm

Here is my portrait done by an artist with brushes on a touch screen Windows 7 computer at PDC 09:

mypdcportrait

Bookmark and Share

Tags: , , ,


Nov 18 2009

PDC Day 1 – Lap Around Windows Azure Notes

Category: ASP.NET, Azure, WCF, WFAdam Toth @ 9:02 am

    Session #1:

    Windows Azure Platform:

  1. Windows Azure
  2. SQL Azure
  3. AppFabric

    …plus developer tools and "Dallas"

    Azure does "Compute" "Management" and "Storage"

    SQL Azure is a relational DB as a service.

    Demo is of a tickmaster-type application that uses Azure.

    TicketDirect Architecture:

    "Compute" using Web and Worker roles to process tickets

    Using the service bus to communicate with on-premise services.

    Storage of data in SQL Azure

    Printing of tickets is offloaded to the site (i.e. venue).

    Site receives a message via service bus to print the ticket for pickup at role call

Another Demo, sample app, of basic CRUD web app.

CRUD is standard ASP.NET SqlDataSource control with SQL commands, that works with SQL Express but runs in the cloud

Demo’d using Trace.Write which writes out to the development console logger and can also write to the Azure Storage logging subsystem

Migrated to SQL Azure by just changing the connection string

Storage (BLOBs, Tables, and Queues)

NEW - Add ability to mount Azure storage as NTFS drive

Coming soon - Ability to manage VMs with admin privileges

Create snapshots of your VMs

When up-scaling, Azure will deploy your app on top of your custom VM image

SQL Azure:

Only pay for what you use

Do not worry about disaster recovery

Change a connection string an have effortless switch to SQL Azure

Sync framework to sync SQL DBs in the cloud with on-premise data

Service Bus:

Securely connect apps (on-premise with cloud)

Tunneling technology

Services bus is a middle man for communication between

Access Control:

Provides outsourcing of claims-based RESTful services

Integrates with ADFS v2

Bookmark and Share

Tags: ,


Nov 18 2009

PDC Day 1 KeyNote Notes

Category: ASP.NET, SharePoint, Silverlight, Technology, WCF, WF, WPF, WinFormsAdam Toth @ 8:53 am

    Windows Azure Improvements since last year:

  1. Support PHP, CGI, Apache, other frameworks
  2. Expose very low-level programming efforts (not just .NET).
    Example was a C++ app with pointers exposed as an Azure service
  3. Identity framework (support passing tokens from federated locations i.e. onsite AD instance)

    SQL Azure Improvements since last year:

  1. Not just RESTful consumption of services anymore
  2. Works with standard TDS based tools (SQL management studio)

    Microsoft has a vision of "Three screens and a Cloud".

    The screens include:

  1. Mobile devices
  2. Desktop computers
  3. Internet connected TVs

    They can all be united by data and services in the cloud.

Public Data in the Cloud (Codename "Dallas").

Repository for public data sets that can be consumed in any number of ways (and easily by Azure)

Accessed through Microsoft PinPoint

Sign up for a CTP key

Some data includes NASA mars photos, GIS data, AP News articles

PinPoint:

Centralized marketplace for partner providers, Azure ISVs and implementers, and gateway to "Dallas" public Data.

"System Center" will plugin to Azure to monitor your Azure instances, check to meet SLAs, and enable you to scale up the Azure instances directly.

2010 will include ability to have the Azure cloud be able to establish a network connection to on-premise resources (i.e. self hosted SQL Server)

WordPress is moving to Windows Azure

Bookmark and Share

Tags: , , ,


Oct 20 2009

.NET Plugin DLL Hell (aka assembly binding nightmares)

Category: Technology, WinFormsAdam Toth @ 6:08 pm

I’ve worked on a few .NET WinForms applications that utilized a “plugin” model. You’ve probably seen similar apps out there, where a main application searches a directory for DLLs, and then tries to load them into the AppDomain, using some code like below:

Assembly plugin = System.Reflection.Assembly.LoadFrom(pluginFileName);

object pluginClass = Activator.CreateInstance(plugin.GetType("Plugin.PluginClass"));

 

This kind of architecture is pretty standard, and is one of the few ways to accomplish this plugin model in .NET (other than some cutting-edge things like MEF). It works for the most part, but has some obvious limitations, such as:

  • Once a DLL is loaded in this manner, it cannot be unloaded from memory (unless you mess around with AppDomains for each plugin)
  • If your plugins want to talk to one another, they pretty much have to go through a lot of plumbing code in the main app

Where it really starts to have problems is when your plugin DLL needs to reference other DLLs used by the main application, or other plugin DLLs, and you find yourself in .NET Plugin DLL Hell.

Here is the crux of the problem:

When you add a reference to a DLL via Visual Studio, the framework will always try to load an exact matching version of that assembly, and will fail if it can’t find it. So, good luck if that DLL you depend on ever gets upgraded to a new version.

You can usually control this with a standalone application, because when you upgrade the app, you upgrade all the dependencies at the same time. In a plugin model, you can’t control when other dependencies are upgraded, and so your plugin will simply fail to load when this happens.

There is no way in the .NET framework to tell it to use a particular version of a DLL or any newer version it finds.

Here’s a scenario to demonstrate this:

  • You have a WinForms application, that loads plugin DLLs when the app starts.
  • The main application uses a third-party control library.
  • You write a plugin that also needs the controls, so you add a reference to the version that the main app uses.
  • At some point, someone working on the main app upgrades it to use a newer controls DLL, recompiles the app, and distributes it along with the newer controls DLL.
  • Since no work was actually done on your plugin, no one has recompiled it against the newer controls DLL.
  • When the upgraded application starts and loads your plugin, your plugin goes BOOM!

Another scenario:

  • Your plugin references another plugin
  • The other plugin gets upgraded without your plugin getting recompiled
  • Your plugin now goes BOOM!

When I say “BOOM!”, I mean you’ll probably see something like this from the Fusion log:

"System.IO.FileNotFoundException: Could not load file or assembly ‘YourDependentAssemblyNameHere’ or one of its dependencies. The system cannot find the file specified.” 

I am having a similar problem with my Windows LiveWriter plugin, xPollinate. Every time Microsoft releases a new version of LiveWriter, all of its DLLs that I reference have new version numbers, and so my plugin will fail to load unless I recompile my plugin against the latest versions of the DLLs.

Well, so what are our options to deal with this?

  • You can simply not add any references in your plugin project via Visual Studio, and just use reflection for everything (yuck). This is probably a little easier now with the dynamic keyword in C#, but not much.
  • You can try to get the main application to put in assembly binding redirects in its config file for any common DLLs that might be referenced by plugins.

That’s all I can see at this point. Here’s to hoping a future version of the framework will make this easier for us.

Bookmark and Share

Tags: , , , , ,


Oct 12 2009

1.0.0.3 Release of xPollinate

Category: TechnologyAdam Toth @ 3:56 pm

I just released a new version of xPollinate, 1.0.0.3.

This is just a maintenance release to make the plugin work with Windows LiveWriter version 14.0.8089.726.

I am currently working on supporting categories for the next release, so stay tuned.

Bookmark and Share

Tags: ,


Sep 17 2009

HP TouchSmart Update Error, Fix, Unfix

Category: UncategorizedAdam Toth @ 2:35 pm

My HP TouchSmart has an HP Updater program that checks for updates to HP software and drivers. This program has recently started finding updates to install, but mysteriously failing to install the updates after downloading them.

Apparently HP was aware of this, because one of the Updates (“Urgent:HP Update fix for “Install Cancelled issue”) was supposed to fix the Updater not working. I ran the updater, it downloaded the Update Fix, and then…. failed to install the fix.

hperror

Nice. An update to fix a problem with an updater, that fails to update the updater.

Bookmark and Share


Jun 25 2009

Review - Accessibility Kit for SharePoint – Half Finished Product?

Category: SharePoint, TechnologyAdam Toth @ 3:29 pm

Rating: ★★☆☆☆

I’m implementing the AKS for a customer, and I’m having a hard time understanding how this product actually made it to a public release. It feels like a product that is half finished, that was used as a springboard to creating a commercial product, while leaving the original free version to the wayside. If you are considering working with this, you might want to read about the frustrations I encountered below:

Installation experience – Where are those .bat files?

When you download the AKS, you’ll get a zip file, which contains a folder and a single EXE installer.

Running the installer will perform the following tasks:

  1. Installs control adapters and reference files into an AKS folder in your Program Files directory.
  2. Copies a feature and master pages/css styles to the /12/Templates/Features folder in your SharePoint installation (if you are running 32 bit).
  3. Creates a Start Menu icon group for AKS tasks and links.

After running through the installer, a quick look at the “Welcome to the Accessibility Kit…” PDF informs you that you need to install and activate the feature:

The AKS Feature
The AKS Feature is not the AKS Kit but a part of the Kit that works as a feature in MOSS. The AKS
Feature installs the Example Master pages and the Modified CSS. You must install this by
selecting Install AKS Feature from the Start Menu:  Start | All Programs | AKS by HiSoftware |
AKS Feature install.  Once the feature is installed, you will still need to activate it within your
SharePoint application through: Site Settings | Site Collection Features. Please note if you are
on a 64 Bit server please follow the 64 Bit instructions.

I looked all over for those “64 bit instructions”, but there was nothing. There was a “64bit Feature Install” icon in the Start Menu, but no text anywhere instructing me to click on it.

I figured out that to install the feature, you need to click on either the 64bit Feature Install icon or the AKS Feature Install icon in the Start menu (note that the shortcuts are only created for the current user, and there is no way to tell the installer to install for everyone). If you run these shortcuts from the Start menu, the command window will flash, execute, and then immediately disappear, before you can check if it finished successfully or not. On a 64 bit server, you’ll see a flash of xcopy commands that copy styles and master pages into the /12 folders.

I wanted to be sure that it installed, so I tried to find the location of the batch file so I could run it again in a command prompt and actually see the result. I right-clicked the shortcut and went to Properties to figure out the target location, and it was greyed out:

image

I looked for the bat file in the Program Files directory, but no luck. Yuck! A .bat file that I can’t see or easily get to?

I figured out that it installed, because I then saw the feature in my Site Collection Features page. I activated it, and then tried to take a look at the master pages and styles.

Control Adapters – Incorrect C#

The AKS comes with several control adapters that rewrite some of the out-of-box control html to make it more compliant. Some of the C# adapter files have mistakes in the C# code that make them not able to compile. For example, in the Web Part Zone Smart Adapter for WCAG2.0, there is an extra curly brace, and even a reference to a variable that is not even declared in the file anywhere:

   1: else

   2: {

   3:

   4:     } // <-- Extra brace?

   5:

   6:     //Output sOutputBuilder to be rendered

   7:     oOutput.Write(sOutputBuilder.ToString()); // <-- sOutputBuilder is never declared in this file!

   8: }

“Smart Adapters” (not too bright)

The AKS comes with several “Smart” control adapters (adapters that do not need a lot of configuration). The Web Part Zone Smart Adapter sounded like it had some promise, as it would convert a web part zone to use divs instead of tables.

However, when you install it, it has the side effect of not rendering any of your web part’s “Titles”. If you want to use the headers that come with the web parts, then this control will not work for you. It also prevented viewing web parts in Design mode, they would just disappear from the page.

Finally, it was hard to see the point of using the adapters at all, as all they appeared to do was add some labels to blogs, wikis, and search boxes. They will certainly not do anything at all if you use the CKS EBE or Wiki versions, or if you have customized/branded the search controls.

Master pages and styles do not exist!

Once you install the feature, a set of master pages and css styles will get installed to the master page and style library galleries for your site collection. I cracked open SharePoint designer, tried to open a master page, and got a nasty error message that the file did not exist and could not be opened.

In order to open the file, I had to run through the SharePoint UI, and “Publish” each master page and CSS style before I could access it via SharePoint designer. There was no mention of this anywhere in the documentation.

Relative font sizes? Good luck!

The AKS stylesheets attempt to change all SharePoint font size declarations into relative sizes in ems, rather than fixed pixel/point sizes. This might work fine for anonymous internet site pages, but if you will ever let your visitors view any of the system pages like list new/edit/upload pages or use out-of-box web parts, good luck tweaking styles for a month to get things right.

Woops, what about default.master?

The AKS installs alternate versions of the out-of-box publishing master pages, such as BlueBand.master, BlackBand.master, etc. I don’t know about you, but none of my customers have ever started from those master pages on internet sites, and all my intranet applications make heavy use of default.master. I was really disappointed to see that there was no alternate version of default.master.

HCCE – Nothing but trouble

The HiSoftware Code Compliance Kit (HCCE) is a SharePoint event handler that will look for a certain string of text in your SharePoint web pages, and replace it with different (possibly more accessible) text. You use a text file in which you specify pipe-delimited lines of text to find and replace (e.g. “Text to find|Text to replace with”). The HCCE has the following problems when implemented:

  • There is only a debug build provided (no release version).
  • There is no source code (you cannot recompile).
  • There is no regex option for pattern matching. All strings must be matched and replaced exactly.
  • The DLL looks for a hard-coded path to the configuration text file in C:\Program Files\HiSoftware… This doesn’t work on 64bit systems because the installer installs to Program Files (x86). Since you can’t recompile the DLL, your only option is to copy the text file to the Program Files directory.
  • Once you implement the feature, your SharePoint Welcome menu will get rendered above the <html> tag, causing it to appear at the top of your screen and out of place. Several posts about this, and no response at all from HiSoftware.
  • The install/uninstall .bat files do not work, and need to be adjusted for 64bit machines. Why no WSP?

Conclusion

Poorly documented, sloppily put together, and full of holes and mistakes, I was very disappointed in the AKS. Coupled with a total lack of support and responsiveness to issues on their web site, I think it reflects poorly on HiSoftware as a company.

Bookmark and Share

Tags: , , ,


Jun 15 2009

BDC Picker.aspx QueryString Triggers Firewall Security

Category: SharePoint, TechnologyAdam Toth @ 10:00 am

The implementation of the BDC entity picker dialog (opened with the Browse button) can cause some firewall and security software to think a worm or sql injection attack is happening and block the traffic.

The manner in which properties and entity IDs are encoded into long query string values makes the urls appear to be injection attacks. On a particular client’s BDC application, the picker dialog used a url similar to the following:

http://domainname.org/_layouts/Picker.aspx?MultiSelect=False&CustomProperty=uU2hhcmVQb2ludC5Qb3J0YWwsIFZlcnNpb249MTIuMC4wLAF%2F%2FAQAAAAAAAA9QcmltYXJ5Q29sdW1uSWQQU3lzdGVtSW5zdGFuY2VAAA
AAAMAgAAAF9NaWNyb3NvZnQjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibG
ljS2V5VG9rZW49NzFlOWJjZTExMWU5NDI5YwUBAAAAPk1pYAEAAAD%2F%2F%23Jvc29mdC5TaGFyZVBvaW50LlBvcnRhbC5XZWJDb250cm9scy5JdGVtUGlja2
VyRXh0ZW5kZWREYXRhB
JZAhFbnRpdHlJZBNTZWNvbmRhcnlDb2×1bW
5zSWRzAAAABw8PDw8CAAAANw4AAAcOAAAIDgAACQMAAAAPAwAAAAAAA
AAPCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3D&EntitySeparator=%00&DialogTitle=Choose%20User&DialogImage=%2F_layouts%2Fimages%2Fbizpicker.gif&PickerDialogType=Microsoft.SharePoint.Portal.WebControls.ItemPickerDialog%2C%20Microsoft.SharePoint.Portal%2C%20Version%3D12.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D71e9bce111e9429c&DefaultSearch=

Using the HTTP GET for this kind of thing is a bad idea, and I hope that Microsoft fixes this in the future.

Bookmark and Share

Tags: ,


Jun 10 2009

Give your Phone Company the Middle Finger with ooma

Category: Reviews, TechnologyAdam Toth @ 3:57 pm

I keep a land line for various reasons, and have really hated all the charges and fees from Qwest just to maintain this. To start with, if you want long distance service, you have to pay up to $10 a month in just taxes and fees to have it, even if you never use it. We ended up dropping the long distance service on our land line, since we had cell phones. This turned out to be a big pain since we couldn’t use our fax machine on long distance calls, and couldn’t use it on the rare occasions when the cell phone wasn’t good enough.

Enter ooma to the rescue.

Ooma is a Voice Over IP system that lets you stick it to the phone companies. For a one time fee of around $250, you get a device that let’s you have a phone line using your broadband internet connection. The sound quality is great, and you never have to pay any monthly fees (unlike MagicJack), and domestic long distance is free. You can even port over your existing phone number for a $39.99 fee.

I started the port away from Qwest about 3 weeks ago, and it is currently switching over right now.

Since I also have Internet service with Qwest, I was concerned that when the port occurred, my internet connection would also go down. However, Qwest has gotten much smarter about this, and will automatically convert your DSL service to a “standalone DSL”, and give your DSL service a new phone number that is only used for data.

Our old bill was $90 per month, and will be ~$50 now for the standalone DSL. Add in the $39.99 porting fee and cost of the unit ($215 from Amazon with their credit card), and it will take us around 7 months to break even (also counting the extra 3-4 weeks of keeping the land line during the porting process).

The only quirk I’ve found so far is a setting for an “ooma Connection Tone”. When a call is connected, a little jingle is played which informs both parties that the connection is on ooma, and not a standard land line. It’s mainly an advertising thing for ooma, but it has the odd side effect of screwing up voice mail. When someone’s voicemail message picks up on the other end, the jingle acts like hitting the “*” key, and sends you to their password prompt to get into their mailbox. I just turn that off, as it is unnecessary anyway.

Rating: ★★★★☆

Bookmark and Share

Tags: , , ,


Jun 03 2009

Google, Bing, and Bias

Category: TechnologyAdam Toth @ 1:59 pm

I’ve just started skeptically using Bing. The first thing I searched for was “xPollinate”, my Live Writer plugin. I guess I can safely say, “Bing!”.

On Google, the first result was for a PHP data conversion project, hosted on a GeoCities web page (apparently not updated since 2004):

image

On Bing, the first result was my plugin’s CodePlex site. The PHP GeoCities site wasn’t even in the top 10.

image

Is this a case of bias? Is Google ranking sites about PHP higher than sites about Windows-based technology? Is Bing ranking Windows-based content higher? Or is this just a result of algorithms?

In any case, this is the first time I’ve preferred the results of a search engine other than Google.

Bookmark and Share

Tags: , , ,


Next Page »