Network problems with Windows 8rc on Vmware

If you are having difficulties attempting to get networking up and running on Windows 8 running under VMWare workstation here is a tip that might fix it for you. It did for me.

Inspect the .vmx file for your virtual machine, and if this line is not present just add it to the vmx file:

ethernet0.virtualDev = “e1000″

Windows Azure Tools: Failed to initialize the Development Storage service.

Recently I setup a new laptop for developing Azure solution.

The first problem is that Visual Studio 2010 must run as Administrator in order to run the local appfabric.

The second problem I ran into was the following error message given when I tried to debug the solution:

Failed to create database  : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

One or more initialization actions failed. The development storage cannot be used without resolving these errors.

Default behaviour seems to be to look for a Sql Express database (more correctly it tries to create a database with Sql Express). This laptop had a default Sql Server 2008 server installed and for some reason the app fabric was not able to find it.

Here is what I did to fix it:

We need to run DsInit

The easiest way to invoke DSInit is to navigate to Start/All Programs/Windows Azure SDK 1.2/ and start Wypindows Azure SDK Command Prompt.

In the command line window type in dsinit /sqlinstance:    (yes leave the instance blank).

If you have a specific instance name you need to connect to you can specify it.

This successfully installed the appfabric required database on my default Sql Server 2008 instance.

Programmatically accessing data from an EntityDataSource

At a client I recently found myself wondering how one can access the data an EntityDataSource returns.

For most applications this scenario does not come up, but I was now curious so I couldn’t just let it go.

I should point out right away that the easiest way to get at the data is to hook the “Selected” event of the EntityDataSource, then you can get the data like this:

(supposing you have an entity/table named Category).

Now that is all fine, but how do you trigger the data to be fetched (execute the Select command) without involving a data bound control like a GridView.

The key lies in being able to cast an EntityDataSource as an IDataSource, and then executing “GetView” from that interface to return a DataSourceView, which can then be made to return a strongly typed list of entities.

The use of the EntityDataSourceReader is as follows:

The full code to my EntityDataSourceReader can be found in the source file linked below.


Windows 2003, IIS6 and the .Net framework 4

I was at a client site today and they were installing the .net Framework 4 on a Windows 2003 server (sp1). Initially I was concerned that the framework might require sp2, but that turned out not to be the case.

We did experience a glitch though when we tried to navigate to the web application we were working on. We were greeted with a “The page cannot be found” 404 error.

We checked the framework version, the app pool, the default documents, and all were correct. After some search I found the answer here (courtesy of Johan Driessen).

The secret is to enable the framework for iis which can be done with this magical invocation:

cscript c:\windows\system32\iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

Web.config – The entry ‘ ‘ has already been added error

So I came across this error message recently in

Web.config – The entry ‘ ‘ has already been added error

The most likely reason for this error is that a duplicate web.config
file exists in the parent level of the web app that gives you this error.

If however that does not seem to be the problem, one thing that worked for me was to ensure that the current application and its “root” application have different app pools.

Quick guide to Entity Framework 2.0

The following code gives a rush tour of the Entity Framework 2.0.

It is by no means a complete guide. The EF has a lot of power and a lot of complexity but this post is meant as a getting started right away guide.

It demonstrates adding/insert records, different ways of adding records with foreign keys, querying the database, and at last deleting data.

Here is the schema:


Sharepoint 2010 – The search request was unable to connect to the Search Service.

After you have fully configured your search applicatoin, set up the data sources, and confirmed a crawl you might get the following message when you attempt to do a search from your web site

“The search request was unable to connect to the Search Service.”

There can be a couple of different reasons for this error message, such as ensuring that the right service account is running the Search Windows Service, however there is one quick thing to check that might fix your issue.

  1. Goto Central Administration
  2. Application management
  3. Manage Web Applications
  4. Select the web application
  5. Click on Service Connections
  6. Ensure that the search application you configured is checked in this list.

Pdfs will not open in the browser, just save from Document Libraries in Sharepoint 2010

I spent some time researching an interesting issue in Sharepoint 2010 today.

This involves a set of pdf documents that were stored in a document library.

We had created a page that contained links to these documents, but the behavior is consistent if you just do it directly from the document library.

What happens when I clicked on one of the document links in IE was that IE would prompt me to download the file. If I went to other website, and clicked on their Pdf it would open directly in the browser. So I wanted to figure out what was causing this.

What I found was that Microsoft only opens documents it trusts directly from document libraries, and Microsoft does not trust pdf document, and will force you to download it.

Here is how you can get around the behavior:

  1. Goto Central Administration
  2. Application Management
  3. Select the Web app you need to modify
  4. Click General Settings
  5. Change the Brower File handling from Strict to Permissive.

Thats it, your Acrobat document should open directly in the browser in IE now.

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.

This controls the value Start Menu’s grouping values. The value is supposed to be:

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

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.

You can sign up right now

Space is limited for these events.  So sign up today

SharePoint Saturday:

Get On The Bus: Vail: