My Windows 7 Start menu search bar stopped working and how I fixed it


One of the feature I rather like in Windows 7 is the search bar in the Start Menu, that allows me to type in pretty much any Application name, and start it.

No more hunting through the Start Menu hierarchy in order to find that elusive application. It reminds me of a less comprehensive Quicksilver (on Os/x).

For some reason, after some updates and general usage the search bar stopped working as far as application were concerned. I still to this day am not sure why it stopped working.

The symptoms where, I would start the Start Menu, and type in for instance "Notepad" and it would show 3 folders, and hitting enter did nothing. Frustrating!!

I digged around in various options and settings and so forth, for a while without being able to fix my problem.

Thankfully there is a fix, but its obscure, and require you to reboot your computer to work.

The error is due to an invalid registry key.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{ef87b4cb-f2ce-4785-8658-4ca6c63e38c6}\TopViews\{00000000-0000-0000-0000-000000000000}

This controls the value Start Menu's grouping values. The value is supposed to be:
“System.StartMenu.Group”  

When the search stops working usually and in my case this value was set to Null.

  1. In order to change this value start regedit.
  2. Browse to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{ef87b4cb-f2ce-4785-8658-4ca6c63e38c6}\TopViews\{00000000-0000-0000-0000-000000000000} registry key
  3. Click Modify
  4. Change the value to System.StartMenu.Group
  5. Reboot

author: William Kent | posted @ Thursday, February 04, 2010 9:19 PM | Feedback (0)

Sharepoint Saturday in Denver


My good friend Ryan McIntyre is on the organizing comittee, and my employer Statera is a corperator sponsor fro the Sharepoint Saturday Event.

This is an exciting oppertunity to learn about Sharepoint, hear some news about Sharepoint 2010, and network with fellow Sharepoint enthusiast from the Denver area.

http://www.sharepointsaturday.org/denver/default.aspx

You can sign up right now

Space is limited for these events.  So sign up today

SharePoint Saturday:
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434871&Culture=en-US

Get On The Bus: Vail:
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032434880&culture=en-US

author: William Kent | posted @ Friday, November 20, 2009 9:56 AM | Feedback (0)

Black Friday deals from Amazon


Amazon has released the link for their Black Friday deals.
They are extending their BlackFriday sale for a week preceding
the date.

Amazon Black Friday Deals (starting a week early)

author: William Kent | posted @ Friday, November 20, 2009 9:47 AM | Feedback (0)

Creating a form in Infopath for saving and loading through WCF with parameters for Forms Server


Part 1: Configuring Sharepoint for forms server
Part 2: Creating a WCF web services to be used by the forms server

This article will discuss the creating and configuration of an Infopath form that will be run through Forms Server in Moss 2007.
Instead of storing the forms in a document library, it will store the data in a Sql Server database. The article will also discuss loading content into a form from Sql Server. We will use WCF as layer that communicates between Forms Server and Sql Server.

The reader might ask why one would want to create such a complicated framework around an Infopath form, when storing forms in a library is easy and supported out of the box. If you can use a document library, please do so. Its a lot easier, in every possible way. In fact I would recommend document libraries over this approach in most any situation.

There are a few cases where security policies might make using a document library as the central repository for all the forms.

Using WCF as the middle tier, allows very tight control over who may view and who may contribute a form. This was the case in the project where we developed this strategy.

Since we will be passing parameters, we need a tiny bit of code-behind in the form, so we develop the form in Visual Studio.Net 2005 with the Infopath extensions

 The high level workflow will be:

  1. Creating the form in Visual Studio
  2. Connecting the Data Source to the web services
  3. Creating the Data Connection files
  4. Approving the new  Data Connection files
  5. Integrating the Data Connection files with Infopath
  6. Setup the code behind to handle the parameters
  7. Saving the form to the local hard drive,
  8. Uploading the form to Sharepoint,


 

Creating the from in Visual Studio

Ensure that you have the Infopath tools for Visual Studio installed on your machine.
Head over to the New Projects, and select the InfoPath Form template.

CreatingAForm

 

Open up the manifest.xsf and add all the fields and logic you need.

 

Connecting the Data Source to the web services

We need to tell Infopath what web service we wish to use to load the data for the form.

Select Data Connections

DataConnections

 

Click add, and Click Submit data

SubmitConnection

 

We wish to use  a web service

 

ConnectToWebService

Enter the Url of the web service you created in Part 2

EnterUrl

Select the appropriate method for retrieving the data

SelectMethod

It takes one parameter, you need to assign where in the form, the method can retrieve the data from. (The web service method takes the parameter)

AssignParameters

Click through and your done.

Click through and do the exact same thing for the submit data connection.

The screens are pretty much the same, just select the other method.

Ensure that you use the Xml Subtree option.

 

Creating the Data Connection files

Now we need to create the Data Connection files.

The data connection files tells Sharepoint, and Forms Server what urls the form is allowed to call. So basically its a security feature. These files can be hand coded and coupled together, but for simplicity just have Infopath generate them.

Go back to o data connections, and this time select Convert.

ConvertDatasource

 

Enter the Url you prepared in Part 1

 UrlForDataConnectionFiles

 

Approving the new  Data Connection files

Now go to the Data Connection Library you setup in Part 1

Make sure you approve both of the new Data Connection files that were just created.

If the files are not approved they cannot be used later.

Integrating the Data Connection files with Infopath

This step has already been done behind the scenes for you in Infopath, using the Convert step.

Setup the code behind to handle the parameters

Add a Loading Events event handler.

In this event handler what we need to do is to read the parameter, and load data associated with that parameter.

Ensure that you update the xpath expression.

if (e.InputParameters.ContainsKey("id")) {

Guid token = new Guid(e.InputParameters["id"]);
this.DataSources[0].CreateNavigator().SelectSingleNode(@"Xpath to id field on form", this.NamespaceManager).SetValue(token);
this.DataConnections["Main query"].Execute();

}

 Then add an event handler you link to the submit button on your form

this.DataConnections["Main submit"].Execute();

 

Saving the form to the local hard drive

Select Publish form template

PublishForm

 Publish the file to your local hard drive.

Uploading the form to Sharepoint

 You have to go to the Central administration for your Sharepoint box.

Navigate your way to Application Management, and then Manage Form Templates.

Click on Upload form template

Upload Form

Select the file you published from Visual Studio, hit upload.

UploadStep2

 

Now navigate to the forms library where you wanted to access the form.

Go to Settings, and now you need to add the form you just uploaded to the Content Type for this forms library.

This will enable you to select the appropriate form when you hit New on this document library.

 

 

author: William Kent | posted @ Tuesday, June 10, 2008 4:05 PM | Feedback (0)

ReSharper 4.0 has been released


ReSharper 4.0 has been released and it has a 30 day trail available.

ReSharper 4.0 features full support for C# 3.0 and LinQ.

It also has some new refactorings built in, and promises to be faster.

I have been using the beta version on Visual Studio 2008 for a while, and I did not notice any errors with the version I had.
A great thing about it, is that it can help you in learning some of the new C# 3.0 features, by suggesting refactorings that
take advantage of the new features.

I was shocked by the cost to upgrade from 3.0 to 4.0 though: $249. That is excessive.
Around $150 – $100 would be reasonable and expected.

For someone who has been using ReSharper since pre 1.0 it felt a bit like a slap in the face. 

 I hope jetBrains might drop the upgrade fee, or at least have an introductory upgrade offer.

UPDATE: I received a message from Ann of Jetbrains, saying that there was a minor issue with the web page
that had the pricing, and that the correct pricing is now available. This brings the cost down to $209 for Full version 3
to Full version  upgrade, and a good $149 for C# 3 upgrade to C# 4 upgrade.

 

 

author: William Kent | posted @ Tuesday, June 10, 2008 2:06 PM | Feedback (0)

Programatically updating a BDC primary key column in MOSS


If you have a document library or list, that contains a BDC column, you mig th run into updating the value of the primary key column programatically .If you try to do this the regular way,k you will not receive an error, but the new value will never show up in the row.
AnSPFile.Item["MyPrimaryBDCColumnsName"] = 1;

Instead you need to seek out the internal name of the column your trying to modify. You can do this easily by iterating over the columns of the list. Once you have located the internal name of the column, use that as the indexer for the row, and us the little documented class EntityInstanceIdEncoder to convert your new value into a BDC formatted value.

An example of using EntityInstanceIdEncoder.

AnSPFile.Item["MyPrimaryBDCColumnsInternalName"] = EntityInstanceIdEncoder.EncodeEntityInstanceId(new object[] { "1" });

You can quickly see if a column contains BDC encoded information by looking at the actual data (programatically) of the column. If the values look a bit like “_xxx30935” its probably a BDC encoded column.
Note: In the regular list view interface, Sharepoint will display a user friendly interpretation of the BDC data.

The EntityInstanceIdEncoder has a second function which will convert BDC encoded data back to its normal form.

object[] decoded = EntityInstanceIdEncoder.DecodeEntityInstanceId(source);

The EntityInstanceIdEncoder has a third function which you can use to tell if a column contains BDC encoded data or not

EntityInstanceIdEncoder.IsEncodedIdentifier (Convert.ToString(AnSPFile.Item[ "MyPrimaryBDCColumnsInternalName"])

One caveat to this method is that it will return false if the value of the current row is null, even if all other rows in the column contain encoded bdc information.

Hopefully this will help others who are faced with modifying a BDC column programatically and cannot find a lot of documentation on the subject in the Sharepoint documentation.

 

author: William Kent | posted @ Monday, June 09, 2008 4:24 PM | Feedback (0)

Code to store Infopath forms via WCF


The following is a code snibbit which will allow you to store Infopath forms via WCF.

In this post I focus soley on the WCF aspects, in a later post I will talk about the configuration of the Infopath form in order to utilize the code.  

using System;

using System.Data;

using System.IO;

using System.ServiceModel;

using System.Xml;

 

[ServiceContract()]

[XmlSerializerFormat]

public interface IInfopathStorage

{

    [OperationContract]

    XmlDocument LoadForm(int id);

 

    [OperationContract]

    void StoreForm(XmlDocument xmlDoc, int id);

}

 

public class InfopathStorage : IInfopathStorage

{

    public XmlDocument LoadForm(int id)

    {

 

        XmlDocument xmlDoc = new XmlDocument();

        StringReader sr = new StringReader(MyDal.GetForm(id));

        xmlDoc.Load(sr);

        return xmlDoc;

    }

 

    public void StoreForm(XmlDocument xmlDoc, int id)

    {

        MyDal.StoreForm(xmlDoc, id);

    }

}

 

The most notable part of the code should be the [XmlSerializerFormat] attribute. This bit of magic will allow the passing of the XmlDocument object. Without the attribute you will get a compile time error stating that the XmlDocument cannot be serialized.

  <service name="InfopathStorage" behaviorConfiguration="returnFaults">
    <endpoint contract="IPersonalClientQuestionnaire" binding="basicHttpBinding"/>
   </service>

In your web.config file where you configure the WCF endpoints, its important to make sure your binding is set to basicHttpBidining, instead of wsHttpBiding. Otherwise Infopath will return errors.

 

author: William Kent | posted @ Monday, June 09, 2008 3:53 PM | Feedback (0)

Configuring Sharepoint for use with Infopath and forms server


Pre requisites

  • A server running Moss 2007 (Enterprise license)
  • Visual Studio 2005
  • Infopath extensions for Visual Studio 2005

 

Sharepoint configuration

  • Ensure that you have activated the Enterprise license
  • Ensure that you have activated the Forms server feature
  • Ensure that the forms library is available in the site where you wish to publish infopath forms.

 

If the site you intend to publish your forms at is a publishing site, the option to create a forms library will not exist, in which case you have to activate a feature to have access to the forms library.

Ensure that the following features are enabled (on the site and the site collection):

  1. Office SharePoint Server Enterprise Site features
  2. Team Collaboration Lists
  3. Office SharePoint Server Standard Site features

Create a library to hold the Data Connection files

If this library type is not visible in Sharepoint for you, you need to enable enterprise feature on the portal and in the site. Jot down the address to the library you just created, you will need it later.

The data connection file is a configuration file that tells Sharepoint how and with whom an Infopath form is allowed to communicate with, when its running in Forms Server. You can have Infopath client create them automatically, and put them in the data connection library. If you use the Infopath client to automatically create the files and put them in the library, the client will automatically reference the Data connection files in the library. If you manually create the data connection files, you need to update the forms to reference the new data connection file. The data connection files are used for submitting forms, loading forms, and loading data via web services into drop down menus or other dynamic content.

 

Create a forms library

 

This will be the library where you want to create the forms.

At this point Sharepoint should be ready to host the forms and the configuration files required to get an Infopath up and running.

 

author: William Kent | posted @ Monday, June 09, 2008 11:39 AM | Feedback (0)

Amazon.com is down


Amazon.com appears to be down, and has been down for quite a while.

Http/1.1 Service Unavailable”

You can still access your amazon.com goodies via the secure site (https).

It will be interesting to find out what caused such a widespread and long outage and one of the premium .com sites.

 

 

 

author: William Kent | posted @ Friday, June 06, 2008 12:12 PM | Feedback (0)

Enterprise Library 4.0 is out


A brand new version of the Enterprise Library has been released.

Most notable is the integration and support for Visual Studio 2008.

author: William Kent | posted @ Friday, May 16, 2008 1:13 PM | Feedback (0)