JavaScript Developer
JavaScript Developer

Reputation: 4008

Using Windows Azure and ASP.NET MVC with Membership

I had an ASP.NET WebForms application. I have been migrating it to use ASP.NET MVC. In the process, I had to strip out my membership code and use a newer implementation. Currently, I am successfully using the SQL Table Profile provider with Windows Azure: http://code.msdn.microsoft.com/Using-the-SQL-Table-4c220996/view/SourceCode#content

My challenge is, what is the equivalent for membership? Considering the SqlMembershipProvider will not work with ASP.NET MVC, I'm not sure what to use now. I need to authenticate my users. Can someone please tell me what "DefaultMembershipProvider" I can use with my tables that are hosted on SQL Azure?

Thank you!S

Upvotes: 0

Views: 1453

Answers (1)

AvkashChauhan
AvkashChauhan

Reputation: 20556

You would need to use SQL Azure with your webrole to get it working. Sql Azure database has the Asp.net membership/role etc. tables, then Membership and Role provider will work normally without further changes to the Provider. And you sure can use SQLMembershipProvider with MVC3 ASP.NET Web Role and SQL Azure on Windows Azure. You may find articles on internet on how to use it all together:

http://romikoderbynew.com/2011/02/02/using-autofac-mvc3-sqlmembershipprovider-and-entity-framework-in-windows-azure-and-sql-azure/

Also you sure can create your own if wish to as described in this discussion: ASP.NET MVC3 Custom Membership Provider - The membership provider name specified is invalid

Upvotes: 1

Related Questions