<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VS 2010 &#8211; Tjitjing Blog</title>
	<atom:link href="http://localhost/index.php/tag/vs-2010/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.tjitjing.com/</link>
	<description>This is my blog on technology related stuff and on occation other things too...</description>
	<lastBuildDate>Thu, 17 Jun 2010 00:20:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.16</generator>
	<item>
		<title>MySQL and Visual Studio 2010 Membership, Roles and User Profile Provider</title>
		<link>https://blog.tjitjing.com/index.php/2010/06/mysql-and-visual-studio-2010-membership-roles-and-user-profile-provider.html</link>
					<comments>https://blog.tjitjing.com/index.php/2010/06/mysql-and-visual-studio-2010-membership-roles-and-user-profile-provider.html#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Thu, 17 Jun 2010 00:20:46 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Membership Provider]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS 2010]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=253</guid>

					<description><![CDATA[In Visual Studio 2010 (VS2010) when you create a new Web Application Project using the default Web Template &#8220;ASP.NET Web Application&#8221; it creates an Account folder with the files Login.aspx, Register.aspx and ChangePassword.aspx. These are files/pages for ASP.NET Membership which is ASP.NET&#8217;s built-in user handling. I have never used Membership before but have been curious&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2010/06/mysql-and-visual-studio-2010-membership-roles-and-user-profile-provider.html">Continue reading <span class="screen-reader-text">MySQL and Visual Studio 2010 Membership, Roles and User Profile Provider</span></a>]]></description>
										<content:encoded><![CDATA[<p>In Visual Studio 2010 (VS2010)  when you create a new Web Application Project using the default Web Template &#8220;ASP.NET Web Application&#8221; it creates an Account folder with the files Login.aspx, Register.aspx and ChangePassword.aspx.<br />
These are files/pages for <a target="_blank" href="http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx" rel="noopener noreferrer">ASP.NET Membership</a> which is ASP.NET&#8217;s built-in user handling. I have never used Membership before but have been curious to, so I saw this as my cue to do so. However since I&#8217;m running MySQL as my database server I knew I had some extra installing and configuring to do. </p>
<p>Now several hours later I have finally figured out what I needed to do&#8230;</p>
<p><strong>1) Install the <a target="_blank" href="http://dev.mysql.com/downloads/connector/net/" rel="noopener noreferrer">latest version of MySQL Connector/NET</a>. Visual Studio support is from version 6.3 which is currently only available in beta, current version when writing this is 6.3.2 beta.</p>
<p>2) Use the <a target="_blank" href="http://dev.mysql.com/doc/refman/5.5/en/connector-net-website-config.html" rel="noopener noreferrer">MySQL Website Configuration Tool, follow instructions found by clicking this link</a>. This tool will modify necessary configuration files (have not checked which, maybe only web.config) to use MySQL Membership, Roles, User Profile and/or Session State.</p>
<p>Important: (this took me quite some time to figure out) the MySQL Website Configuration Tool icon only shows up in the Solution Explorer if you create a Web Site Project in VS 2010. It does not show if you create a Web Application Project. I have reported this as a <a target="_blank" href="http://bugs.mysql.com/bug.php?id=54571" rel="noopener noreferrer">bug to MySQL</a>.</p>
<p>The only workaround I found to use a Web Application instead of using a Web Site was to create a temp Web Site project, run the MySQL Web Configuration Tool and then use copy and paste to move changes from web.confg to my Web Application Project. I have provided these changes at the end of this post.</p>
<p>3) Done!<br />
</strong></p>
<p>I am running Windows 7 64-bit, Visual Studio 2010 and MySQL Connector/NET 6.3.2 beta, but <a target="_blank" href="http://forums.mysql.com/read.php?38,277438,277438" rel="noopener noreferrer">according to this thread</a> other people with other versions of VS seems to be having the same problem.</p>
<p>These are the changes that are made to web.config:<br />
 [code lang=&#8221;xml&#8221;]<br />
  &lt;connectionStrings&gt;<br />
    &lt;remove name=&quot;LocalMySqlServer&quot; /&gt;<br />
    &lt;add name=&quot;LocalMySqlServer&quot; connectionString=&quot;server=localhost;User Id=root;database=users;password=xxx&quot; providerName=&quot;MySql.Data.MySqlClient&quot; /&gt;<br />
  &lt;/connectionStrings&gt;<br />
[/code] </p>
<p>[code lang=&#8221;xml&#8221;]<br />
&lt;system.web&gt;<br />
    &lt;authentication mode=&quot;Forms&quot;&gt;<br />
      &lt;forms loginUrl=&quot;~/Account/Login.aspx&quot; timeout=&quot;2880&quot; /&gt;<br />
    &lt;/authentication&gt;<br />
    &lt;membership defaultProvider=&quot;MySQLMembershipProvider&quot;&gt;<br />
      &lt;providers&gt;<br />
      &lt;clear /&gt;<br />
      &lt;remove name=&quot;MySQLMembershipProvider&quot; /&gt;<br />
        &lt;add name=&quot;MySQLMembershipProvider&quot; type=&quot;MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.3.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; applicationName=&quot;/&quot; description=&quot;MySQL default application&quot; connectionStringName=&quot;LocalMySqlServer&quot; writeExceptionsToEventLog=&quot;True&quot; autogenerateschema=&quot;True&quot; enablePasswordRetrieval=&quot;True&quot; enablePasswordReset=&quot;True&quot; requiresQuestionAndAnswer=&quot;False&quot; requiresUniqueEmail=&quot;False&quot; passwordFormat=&quot;Clear&quot; maxInvalidPasswordAttempts=&quot;5&quot; minRequiredPasswordLength=&quot;6&quot; minRequiredNonalphanumericCharacters=&quot;1&quot; passwordAttemptWindow=&quot;10&quot; passwordStrengthRegularExpression=&quot;&quot; /&gt;<br />
      &lt;/providers&gt;<br />
    &lt;/membership&gt;<br />
    &lt;profile defaultProvider=&quot;MySQLProfileProvider&quot;&gt;<br />
      &lt;providers&gt;<br />
        &lt;clear /&gt;<br />
        &lt;remove name=&quot;MySQLProfileProvider&quot; /&gt;<br />
        &lt;add name=&quot;MySQLProfileProvider&quot; type=&quot;MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.3.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; applicationName=&quot;/&quot; description=&quot;&quot; connectionStringName=&quot;LocalMySqlServer&quot; writeExceptionsToEventLog=&quot;False&quot; autogenerateschema=&quot;True&quot; /&gt;<br />
      &lt;/providers&gt;<br />
    &lt;/profile&gt;<br />
    &lt;roleManager enabled=&quot;false&quot; defaultProvider=&quot;MySQLRoleProvider&quot;&gt;<br />
      &lt;providers&gt;<br />
        &lt;clear /&gt;<br />
        &lt;remove name=&quot;MySQLRoleProvider&quot; /&gt;<br />
        &lt;add name=&quot;MySQLRoleProvider&quot; type=&quot;MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.3.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; applicationName=&quot;/&quot; description=&quot;&quot; connectionStringName=&quot;LocalMySqlServer&quot; writeExceptionsToEventLog=&quot;True&quot; autogenerateschema=&quot;True&quot; /&gt;<br />
      &lt;/providers&gt;<br />
    &lt;/roleManager&gt;<br />
  &lt;/system.web&gt;</p>
<p>[/code]<br />
</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2010/06/mysql-and-visual-studio-2010-membership-roles-and-user-profile-provider.html/feed</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
