{"id":6488,"date":"2014-04-18T07:06:56","date_gmt":"2014-04-18T07:06:56","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/problem-about-simplemembership-collection-of-common-programming-errors\/"},"modified":"2014-04-18T07:06:56","modified_gmt":"2014-04-18T07:06:56","slug":"problem-about-simplemembership-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/problem-about-simplemembership-collection-of-common-programming-errors\/","title":{"rendered":"problem about simplemembership-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/260f042713907af38bdb6ab7c4f2228e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nZsolt<br \/>\nasp.net .net asp.net-membership asp.net-mvc-4 simplemembership<br \/>\nI want to enable the ASP.NET MVC 4&#8217;s SimpleMembership API to integrate with my own database schema. I have a plain and simple table in my database called Users with these fields:Id Name Password Email IsDeletedI have already configured the SimpleMembership API to use my database:WebSecurity.InitializeDatabaseConnection(&#8220;MyStuff&#8221;, &#8220;Users&#8221;, &#8220;Id&#8221;, &#8220;Name&#8221;, autoCreateTables: true);And I can insert a user too:WebSecurity.CreateUserAndAccount(model.UserName, model.Password, new { IsDeleted = false, Ema<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c6cef3005bbfdbd0e0873ae18fbde32c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSteve Johnson<br \/>\nc# mysql asp.net-mvc asp.net-mvc-4 simplemembership<br \/>\nI am trying to: use Simple Membership provider based authentication with MySQL using ASP.NET MVC 4 default web application configured to use MySQL using the tutorial given at: http:\/\/www.nsilverbullet.net\/2012\/11\/07\/6-steps-to-get-entity-framework-5-working-with-mysql-5-5\/and here at ASP.NET MVC 4 EF5 with MySQLI am using MySQL Connector 6.6.4 with EF 5.0 and Visual Studio 2012 and working with an ASP.NET MVC 4 Internet application template. The errors i am facing is this:Server Error in &#8216;\/&#8217; App<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/adf1713ee965aae74c896e8991d6340e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDylan Parry<br \/>\nasp.net-mvc-4 simplemembership<br \/>\nI&#8217;m trying to add authorize attributes to some of my MVC4 controllers, and they work fine as long as it&#8217;s a plan [Authorize] or [Authorize(Users=&#8221;myuser&#8221;)], but the second I add in any sort of role filtering it falls apart, eg. [Authorize(Roles=&#8221;admin&#8221;)]. I then start getting errors like:Server Error in &#8216;\/&#8217; Application.A network-related or instance-specific error occurred whileestablishing a connection to SQL Server. The server was not found orwas not accessible. Verify that the instance name is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/569b175432ff4415347db17530479081?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nCYen<br \/>\nc# mysql entity-framework asp.net-mvc-4 simplemembership<br \/>\nI am trying to build a social networking site with all kinds of complex relationships. So far, I have been able to add Users into the MySql database. That works. I think since I can insert based off the entity context, ModelFirstContainer, it is safe to assume the connection string and providers would be correct, right?However, since I&#8217;ve added Simple Membership I get 3 different errors depending on my WebSecurity:Keyword not supported: &#8216;metadata&#8217;. Unable to find the requested .Net Framework Dat<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/004c325bf11d5e6f3974d76c463e2f8f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKaan<br \/>\nasp.net-mvc-3 asp.net-webpages simplemembership<br \/>\nIf Sql Server database collation is Turkish_CI_AS, I get that error at below cause UPPER function in SELECT Query in &#8220;GetUserId&#8221; method of SimpleMembershipProvider.cs class.SQL UPPER(&#8216;info&#8217;) is not equal to &#8220;info&#8221;.ToUpperInvariant() in Turkish_CI_ASSql Server Database Collation : Turkish_CI_ASWebSecurity.CreateUserAndAccount(&#8220;info&#8221;, &#8220;123456&#8221;);Exception Details: System.Web.Security.MembershipCreateUserException: The Providerencountered an unknown error.<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zsolt asp.net .net asp.net-membership asp.net-mvc-4 simplemembership I want to enable the ASP.NET MVC 4&#8217;s SimpleMembership API to integrate with my own database schema. I have a plain and simple table in my database called Users with these fields:Id Name Password Email IsDeletedI have already configured the SimpleMembership API to use my database:WebSecurity.InitializeDatabaseConnection(&#8220;MyStuff&#8221;, &#8220;Users&#8221;, &#8220;Id&#8221;, &#8220;Name&#8221;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6488","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6488"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6488\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}