Upgrading to rotativa.io

date Feb 24, 2016

Upgrading and existing Asp.net MVC site from local Rotativa installation to Rotativa.io is quite straightforward.

You just need to uninstall Rotativa:

PM> Uninstall-Package Rotativa

This will remove the Rotativa dll and it should also remove the folder containing the wkhtmltopdf executable. If it doesn’t get removed you can manually remove it. This means your site will also have a smaller size with Rotativa.io.

Now you should install Rotativa.io:

PM> Install-Package RotativaHQ

This will install the RotativaHQ dll for the Asp.Net MVC version you are using, for example RotativaHQ.MVC5. Of course you should add using RotativaHQ.MVC5; (for MVC 5) and remove using Rotativa; in the controllers using Rotativa.

Finally you need to add Rotativa.io configuration in the <appSettings> section of your web.config, using the key and endpoint you’ll find signing in as a registered user in the “preferences” page:

<add key="RotativaKey" value="YOUR_KEY" />

<add key="RotativaUrl" value="YOUR_ENDPOINT" />

And that’s all, your Asp.net MVC app/site now uses Rotativa as a cloud http service.