3

Has anyone out there been using the ASP.NET Membership Provider code with the new 1.3 toolkit and MVC?

I am looking for some more updated code and so far all I can find is the code here:

http://archive.msdn.microsoft.com/windowsazuresamples

Has anyone any information on anything more recent? It seems odd that these outdated examples are all that I could find and these are not using MVC.

Thanks,

Gordon

GordonHowe
  • 103
  • 1
  • 5

3 Answers3

3

I've used that sample with the 1.3 release.

It does work.

However, overall I've found that there are severe restrictions with using Table Storage for membership - if you use table storage, then it's hard to get even simple information out like how many users do I have?

If your Membership needs are very trivial then you can use Table Storage as shown in these examples. However, if you have more advanced needs, then you'll either need to do a lot of work on the samples, or you'll need to switch to SQL Azure.

For the sites I'm building, where I'd like to one day have a paid membership scheme, then I've started using more normal SQL-based Membership.

Stuart
  • 66,722
  • 7
  • 114
  • 165
1

The problem with Azure Storage is that there is no way to ensure atomic operations, so there is no way to "lock" a resource in a straightforward way. I mean, you cannot execute this atomically:

  1. Check if locked.
  2. If not locked, lock.
  3. Fetch
  4. If locked, return "Is Locked, try again later"

So then, you can try to set a "locked" flag in your table entity, but when the query comes back saying "is locked", webrole can lock it. Of course you cannot lock straightaway w/o check.

Azure Blobs have something called "leases" but are for minimum one minute, not very suitable for webpages where each page can write and read.

As there is no way to lock resources, you end with an app that runs when you have very few users... if not you're the only one :D. But when you make some load test, you see a lot of concurrency issues related with ETags. I tried to use the session provider and I gave up.

The examples runs quite neat, but if you put several webroles in parallel and execute some heavy load test, you will see the issues.

Community
  • 1
  • 1
vtortola
  • 34,709
  • 29
  • 161
  • 263
0

Take a Loock on this solution: http://azureproviders.codeplex.com/

It's an entire Membership based on Blobs & Tables Without an SQL Database.

OBender
  • 2,492
  • 2
  • 20
  • 33