How to Use a Remote Database with Web Platform Installer (WPI) in IIS

The Microsoft Web Platform Installer (WPI) is an essential tool for any IIS administrator. Not only does it let you install web applications, but it also installs dependencies, making it a one click solution for what used to be a deployment nightmare. People like me who grew up in the “old school” days of brutally complex, manual set-ups weep tears of joy for the installer’s simple use.

WPI will install to a local database (and even install a local database if you don’t have one).  This is great for experimenting with MySQL and SQLExpress based web apps in a dev or staging environment, but is not appropriate for a production environment, where the database is pretty much guaranteed to be on another server.  Yet, WPI doesn’t let you select a remote database by default during installation.  There’s a simple solution though:

  • On the main WPI screen, select Options:

wpi1

 

  • Scroll down to the Remote Database support option set
  • Enter the name of your database (this can be a server name, an IP address or a DNS entry)

wpi2

 

  • Save your settings
  • Now, when you are installing an application with WPI that requires a database, you will be allowed to select your remote database!

Wait… don’t panic if you see the following error:

wpi_error

Error writing to preferences: System.NullReferenceException: Object
reference not set to an instance of an object.
at
Microsoft.Web.PlatformInstaller.UI.PreferencePage.WritePreferences()

That’s a mouthful.  Ok, this annoying problem is either a bug or an obscure permissions error (even though you may be accessing the IIS Management Console as Administrator, WPI may be accessing privileged data as the IIS user).  To resolve, run WPI as standalone instead:

  1. Press Start / Go to Start page
  2. Search for “Microsoft Web Platform Installer” and launch
  3. This time, changes will save

That’s it.

k

 

Karim Sultan
My vision is for digital innovation across the divide, by securing and simplifying the Internet and extending its reach to every citizen on Earth and beyond.

One Response to “How to Use a Remote Database with Web Platform Installer (WPI) in IIS

Leave a Reply

Your email address will not be published. Required fields are marked *