Search code examples
authenticationasp.net-mvc-4simplemembership

Simple Membership Provider case sensitive username


Are there any settings in Simple Membership Provider allowing to make username case sensitive? I'm building ASP.NET MVC 4 application, based on VS 2012 template.


Solution

  • Have you tried changing the collation of the username field to a case sensitive variant on the db?

     ALTER TABLE dbo.MyTable ALTER COLUMN CharCol varchar(10) COLLATE Latin1_General_CS_AS NOT NULL;
    

    You will need to adjust the table names and types etc