Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to setup custom schema for the new Microsoft.Asp.NET Identity (MVC5)
    text
    copied!<p>I have been struggling with the new Forms Identity process Microsoft introduced with the One Asp.Net implementation -- in particular with regards to Asp.NET MVC5. </p> <p>My issues are twofold:</p> <ol> <li><p>How to point the context to a regular SQL instance instead of the LocalDb. At the very least LocalDb is not viable for me since my hosting provider does not support it.</p></li> <li><p>How to use a custom database for my identity entities.</p></li> </ol> <p>I realize I could just change the connection string for the "DefaultConnection" entry in the Web.Config. But that still leaves me a series of tables prefixed with "AspNet" or some such.</p> <p>Under the old MembershipProvider architecture, you could inherit from the providers and implement everything you needed in any way you want by placing entries in the Web.config that pointed the Forms Authentication process to your custom membership process.</p> <p>With the new identity process, however, there are no hooks in the web.config to use. Additionally, inheriting from it is not any good as nothing appears to be virtual and to top it all off, it is inheriting from an existing context to boot. </p> <p>I tried using my own context with entities implementing the appropriate new interfaces, but all it did was ignore my context completely and not only that, use localdb with a default DefaultConnection Connection String, ignoring my own context.</p> <p>Since this is a new Microsoft brainchild, there are no real walkthroughs on how to customize the new process, just demos on how great the new process is. </p> <p>I came across one entry out in the web that mentioned rolling out your own identity process and connect it to the OWIN process, but I am totally unfamiliar with OWIN and would need at least some info on how this could be done. (My initial foray into the OWIN project is not yielding any results)</p> <p>Does anyone have any info?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload