asp.net mvc 3 - Membership Roles in Azure and MVC -
i'm developing asp.net mvc3 website , i'm using microsoft asp.net universal providers. web.config :
<connectionstrings> <add name="mycontext" connectionstring="data source=tcp:***.database.windows.net,1433;initial catalog=***;user id=***;password=***;trusted_connection=false;encrypt=true;connection timeout=30" providername="system.data.sqlclient" /> </connectionstrings> ... <rolemanager defaultprovider="defaultroleprovider" enabled="true"> <providers> <clear /> <add name="defaultroleprovider" type="system.web.providers.defaultroleprovider" connectionstringname="mycontext" applicationname="/" /> </providers> </rolemanager>
the connectionstrings ok in azure. aspnet tables , storedprocedures added using query script. info in tables added migrations. checked in management portal. can profile membership , profile data, the code below returns empty list.
var username = user.identity.name; var userroles = roles.getrolesforuser(username).tolist();
username right , table aspnet_usersinroles contains right info too. there no exceptions on page. why userroles empty?
i prepare problem creating custom provider, inherited sqlroleprovider.
asp.net-mvc-3 azure role
No comments:
Post a Comment