Using SQL Spatial on AppHarbor

by Richard 2. May 2012 17:34

I'm now using AppHarbor for all my websites including Aussie Bushwalking and I'm loving it. My new site (hopefully released very soon) required some SQL Server Spatial operations in the code. No problems, hit up NuGet to grab the Microsoft.SqlServer.Types assembly and we're away. But unfortunately an unmanaged DLL, SqlServerSpatial.dll, is also required so you'll need to do a little more playing before it works.

You'll need to copy the SqlServerSpatial.dll into the bin folder of your app, then make sure to add it to:

  • Your project - set the Build Action to Content
  • Your source control (normally mine is set to exclude the bin folder by default)

You can find SqlServerSpatial in two locations:

  • %SystemRoot%\System32
  • %SystemRoot%\SysWOW64

AppHarbor requires the 64-bit version so grab it from SysWOW64. Once that's done, deploy and enjoy all the goodness that the spatial types give you :)

About Us

RikWare is a software development company based in Brisbane, Australia. Led by director, Richard Mason, RikWare focusses on solving challenging business problems promptly and effectively.

RikWare is also the owner of Aussie Bushwalking, a free, wiki-like collaboration site for bushwalkers and the creator of RikMigrations, a migration framework for .NET.

Aussie Bushwalking

Want to discover some new bushwalking ideas? Share a few of your own? Aussie Bushwalking is like Wikipedia... but for bushwalkers. Head on over. Anybody can see the walks and it's free to sign up and share your own.

 

RikMigrations

RikMigrations is a database migration library for .NET based on the migrations facility provided by Ruby on Rails. It allows simple upgrading and downgrading of databases using .NET code (such as VB or C#) either from the command line or built into your application. Unlike many other migration frameworks, RikMigrations is a stand-alone library which does not rely on a large surrounding framework.