views:

479

answers:

1

I'm struggling to get OpenID working on a Windows Azure application. I'm currently using DotNetOpenAuth (used to be DotNetOpenID) and first I had a problem with the relay step since Azure uses port 20000 internally and that was getting passed back and forth. I found a workaround for this (I'll write a blog post for it).

Next issue is when running the app on a web farm (multiple instances), you'll need to write your own "custom store" for DotNetOpenAuth and save data in a database. This is a pain to write.

There's got to be an easier way. One of the Azure Services perhaps? Has anyone successfully ran a web app that authenticates with OpenID up and running on Azure? What's the best or recommended way?

+2  A: 

The easiest way to get it going is to use no store at all. You can either set Stateless=true on one of the login controls if you're using them, or pass null to the OpenIdRelyingParty constructor. This puts your web site into OpenID stateless or 'dumb' mode. It's slightly slower for users to log in (if you even notice) and you avoid having to write that database store class.

Alternatively, you can vote for more pre-written data stores, including one for Azure on UserVoice.

By the way, the Azure port problem should have been fixed in DotNetOpenAuth v3.1. If it wasn't please reactivate that ticket.

Andrew Arnott
I passed null into the OpenIdRelyingParty constructor like you suggested and it worked. Dumb mode is great. It's probably the same speed because I'd have to do a database lookup otherwise. The URL issue is fixed as well, I was using v3.0. Thanks!
Rob Volk