Getting Started with the DotNetOpenAuth Sample Solution

For a new project, I downloaded the DotNetOpenAuth library, which is currently available in version 4.1.0.12182.

However, opening the Samples solution raises a series of Visual Studio errors:

The Web project ‘OpenIdProviderMvc’ requires missing web components in order to load.
Would you like to download and install them using the Web Platform Installer now?

The Web project ‘OpenIdProviderMvc’ requires missing web components in order to load.
Would you like to download and install them using the Web Platform Installer now?

Of course the dialog does not state which “web components” are missing!

Clicking on ‘No’, the projects simply do not load.

Clicking on ‘Yes’, the IE opens Web Plattform Installer website, but there is still no indication what will eventually be downloaded. (Well, if your URL bar is long enough, you might notice the “?appid=IISExpress” at the end of the URL).

Since my W7 installation already has IIS 7 installed, why should I bother with IISExpress?

A bug report on Connect indicates that the web projects might explicitly rely on IISExpress. Let’s have a look at the OpenIdRelyingPartyMvc.csproj file (right-click on the project that does not load, and select “Edit”)

Indeed, we find references to IISExpress in the first <PropertyGroup>:

 <IISExpressSSLPort />
 <IISExpressAnonymousAuthentication />
 <IISExpressWindowsAuthentication />
 <IISExpressUseClassicPipelineMode />

Remove them or comment them using the XML <!–  –> comment syntax.

The next PropertyGroup contains the line

<UseIISExpress>true</UseIISExpress>

which needs to be removed. Finally, VS will balk at the IIS Url containing a port declaration:

<IISUrl>http://localhost:54347/</IISUrl>

Remove this as well, you can set the IIS URL from the project’s property page.

You can now reload the project, build, and run it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: