问题
Does anyone know how i can get the oAuth part on the ASP.NET membership moved to my MS SQL DB, rather than use localdb which its seems to be doing by default?
I have my users all set up in my SQL db, however the UsersOpenAuthAccounts and UsersOpenAuthData are stored in a localdb.
I am using ASP.NET 4.5, not the MVC framework... just incase that helps.
Update: When i change my connection string to "DefaultConnection" the oAuth" tables are then created in my DB. I suppose this will do. But how do i change the deafult connection to something different?
Alan
回答1:
Use OpenAuth.ConnectionString to specify the name of the connection string to use. I do this in the RegisterOpenAuth method AuthConfig.cs file in the app_start folder.
来源:https://stackoverflow.com/questions/15928453/asp-net-4-5-membership-and-oauth-tables