Using a GUID for a MySQL Membership Provider User

I am using MySql membership provider with .NET MVC 4 application and have configured it according to this tutorial .

The problem is that the provider sets up the table mysql_aspnet_userswith UserID PK as INT(11), while the MSSQL provider uses UNIQUEIDENTIFIER.

I need to transfer existing users to this database, and I would prefer to save the Guid"Users" and "Membership" tables as the primary key.

Is there a way to do this using the MySql membership provider ?

Or do I need to write my own MySql membership provider to use UUIDsas primary keys?

I searched for any documentation or “non-hacked” ways to do this, but so far no luck.

+4
source share
3 answers

I don't think you can prevent the creation of a custom user membership class with a custom membership provider. Something like this tutorial http://msdn.microsoft.com/en-us/library/ms366730%28v=VS.85%29.aspx they use the GUID as well. You need to modify SQL abit to work with MySQL

+1
source

Source: https://habr.com/ru/post/1530536/


All Articles