<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1529598984330847935</id><updated>2011-04-21T11:59:45.804-07:00</updated><title type='text'>Lakshman</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wijethilake.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://wijethilake.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lakshman Wijethilake</name><uri>http://www.blogger.com/profile/05288022934409818367</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1529598984330847935.post-6249573675958798251</id><published>2007-07-09T02:26:00.000-07:00</published><updated>2007-07-09T04:45:46.254-07:00</updated><title type='text'>Encrypt Data using Extended Stored Procedure</title><content type='html'>Extended Store procedures are DLLs that  an instance of sql server  can load and run dynamically. You can create your own extended stored procedure  for external routine using programming language such as C or You can use already created one. In this article I have use xp_md5.dll to explain data encryption using hash5 algorithm. I got this DLL from http://www.cr0.net:8040/code/crypto/md5/ .&lt;br /&gt;&lt;br /&gt;1. Extract this DLL to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn (or appropriate place)&lt;br /&gt;2. Create Extended Stored procedure called xp_md5 in the master data base. Right click on Extended Stored Procedure and select New Extended Store Procedure. Enter xp_md5 for name and select full path to dll.( C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\ xp_md5.dll) &lt;br /&gt;&lt;br /&gt;Or &lt;br /&gt;EXEC sp_addextendedproc 'xp_md5', 'xp_md5.dll'&lt;br /&gt;3. Create a user-defined function for each database in which you plan to use the MD5 procedure&lt;br /&gt;&lt;br /&gt;CREATE FUNCTION [dbo].[fn_md5] (@data TEXT) &lt;br /&gt;RETURNS CHAR(32) AS&lt;br /&gt;BEGIN&lt;br /&gt;  DECLARE @hash CHAR(32)&lt;br /&gt;  EXEC master.dbo.xp_md5 @data, -1, @hash OUTPUT&lt;br /&gt;  RETURN @hash&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Use user define function (fn_md5)&lt;br /&gt;SELECT dbo.fn_md5('Lakshman')&lt;br /&gt;&lt;br /&gt; Out Put&lt;br /&gt;&lt;br /&gt; 47a502ffc3c3b43a4e4856fa88290bdd&lt;br /&gt;&lt;br /&gt; Or if you want store return value in variable.&lt;br /&gt;DECLARE @hash CHAR(32)&lt;br /&gt;EXEC master.dbo.xp_md5 'Lakshman', -1, @hash OUTPUT&lt;br /&gt;PRINT @hash&lt;br /&gt;Result will same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1529598984330847935-6249573675958798251?l=wijethilake.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wijethilake.blogspot.com/feeds/6249573675958798251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1529598984330847935&amp;postID=6249573675958798251' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/6249573675958798251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/6249573675958798251'/><link rel='alternate' type='text/html' href='http://wijethilake.blogspot.com/2007/07/encrypt-data-using-extended-stored.html' title='Encrypt Data using Extended Stored Procedure'/><author><name>Lakshman Wijethilake</name><uri>http://www.blogger.com/profile/05288022934409818367</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1529598984330847935.post-8662984999139903610</id><published>2007-06-28T22:18:00.000-07:00</published><updated>2007-06-28T23:04:12.857-07:00</updated><title type='text'>Paint Ball Tournament (interblocks)- 27 June 2007</title><content type='html'>&lt;div align="center"&gt;Before start the game&lt;br /&gt;&lt;/div&gt;&lt;a href="http://bp3.blogger.com/_MI7DxM_EYDc/RoScMeBENYI/AAAAAAAAAA4/uSO1b2MDT4Y/s1600-h/DSC08266.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081358017610659202" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_MI7DxM_EYDc/RoScMeBENYI/AAAAAAAAAA4/uSO1b2MDT4Y/s320/DSC08266.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_MI7DxM_EYDc/RoScMuBENZI/AAAAAAAAABA/jq4W7NZ8F-Y/s1600-h/DSC08267.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081358021905626514" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_MI7DxM_EYDc/RoScMuBENZI/AAAAAAAAABA/jq4W7NZ8F-Y/s320/DSC08267.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_MI7DxM_EYDc/RoScM-BENaI/AAAAAAAAABI/j54e78uTnqU/s1600-h/DSC08268.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081358026200593826" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_MI7DxM_EYDc/RoScM-BENaI/AAAAAAAAABI/j54e78uTnqU/s320/DSC08268.JPG" border="0" /&gt; &lt;p align="center"&gt;&lt;/a&gt;&lt;img id="BLOGGER_PHOTO_ID_5081353817132643698" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_MI7DxM_EYDc/RoSYX-BENXI/AAAAAAAAAAw/U7-vKKU0cqg/s320/DSC08265.JPG" border="0" /&gt; After finish 1st round&lt;br /&gt;&lt;/p&gt;&lt;a href="http://bp2.blogger.com/_MI7DxM_EYDc/RoScNOBENbI/AAAAAAAAABQ/2PpVqpPJMQY/s1600-h/DSC08282.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081358030495561138" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_MI7DxM_EYDc/RoScNOBENbI/AAAAAAAAABQ/2PpVqpPJMQY/s320/DSC08282.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_MI7DxM_EYDc/RoScNeBENcI/AAAAAAAAABY/WFFNIY21EP8/s1600-h/DSC08283.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081358034790528450" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_MI7DxM_EYDc/RoScNeBENcI/AAAAAAAAABY/WFFNIY21EP8/s320/DSC08283.JPG" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1529598984330847935-8662984999139903610?l=wijethilake.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wijethilake.blogspot.com/feeds/8662984999139903610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1529598984330847935&amp;postID=8662984999139903610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/8662984999139903610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/8662984999139903610'/><link rel='alternate' type='text/html' href='http://wijethilake.blogspot.com/2007/06/paint-ball-tournament-interblocks-27.html' title='Paint Ball Tournament (interblocks)- 27 June 2007'/><author><name>Lakshman Wijethilake</name><uri>http://www.blogger.com/profile/05288022934409818367</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_MI7DxM_EYDc/RoScMeBENYI/AAAAAAAAAA4/uSO1b2MDT4Y/s72-c/DSC08266.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1529598984330847935.post-7127508857963490442</id><published>2007-03-22T22:23:00.000-07:00</published><updated>2007-03-23T04:41:10.630-07:00</updated><title type='text'>Form Authentication with SQL Membership provider</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;This is mainly concerned about form authentication with SQL Server membership provider. Forms authentication with SQL Server is most applicable in situations where users of your application are not part of your Windows domain, and as a result, they do not have Active Directory accounts. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In&lt;/span&gt; &lt;span style="font-family:Verdana;font-size:85%;"&gt;Here , &lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;I'm trying to explain how to create a login page using the new membership Login control, configure your Web application to use forms authentication, create the user store database, grant database access to your Web application account, configure ASP.NET membership settings, and set password complexity rules.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;You create a simple Web application with a index page and a login page. The login page allows existing users to login and new users to register by creating new accounts.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;1. Open Visual Studio 2005 and create new web application delete or rename default.aspx as index.aspx(index page has been used as home page in this example). Add new page named as Login.aspx.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;2. Add Login control from the toolbox.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In this control contains displays &lt;strong&gt;user name&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt; fields and a &lt;strong&gt;Remember me next time&lt;/strong&gt; check box. If the user selects this check box, a persistent authentication cookie is created and the user's browser stores it on the user's hard disk.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;3. Configure web application for Form authentication.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Select web.config file on Solution explorer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;authentication mode="Forms"/&amp;gt;&lt;/code&gt;&lt;code&gt;&amp;lt;forms timeout="30" protection="All" defaulturl="index.aspx" loginurl="login.aspx" name=".ASPXAUTH""/&amp;gt;&lt;/code&gt;&lt;code&gt;&amp;lt;/authentication"/&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Note: If just put authentication mode as Forms and omit other element then It will load defualt setting form Mechine.Config.comments file . That defauls setting are given below.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;forms defaulturl="default.aspx" loginurl="login.aspx" name=".ASPXAUTH" /&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;credentials passwordformat="SHA1" &amp;gt;&lt;/code&gt;&lt;code&gt;&amp;lt;/forms/&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;4. Add &lt;authorization&gt;element under &lt;authontication&gt;element in the Web.Config file. This will allow to all authenticated users to access you web site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;authorization/&amp;gt;&lt;/code&gt;&lt;code&gt;&amp;lt;deny users="?"/&amp;gt;&lt;/code&gt;&lt;code&gt;&amp;lt;allow users="*"&gt;&lt;code&gt;&amp;lt;/authorization/&amp;gt;&lt;/code&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;code&gt;&lt;code&gt;&lt;/code&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;code&gt;&lt;code&gt;&lt;/code&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In here, "?" indicates unauthenticated users and "*" indicates all users.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Create a data base to store user details.&lt;/span&gt; &lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;You can create your SQL Server user store manually by using Aspnet_regsql.exe from the command line. Alternatively, you can run Aspnet_regsql.exe in Wizard mode or use the ASP.NET Web Site Configuration tool available on the Website menu in Visual Studio .NET 2005. In this example , manual method is used by me.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Use aspnet_regsql to create membership by using Visual studio 2005 Command prompt.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;Start&gt;All Program&gt;Microsoft Visul Studio 2005&gt;Visul Studio Tools&gt;Visul studio 2005 command prompt&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;run Aspnet_regsql.exe with following parameters -S &lt;servername&gt;-A m -E&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;systex&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;aspnet_reg.exe -S (local) -A m -E&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-S -- specified the server name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-E -- specified windows authentication to connecte SQL server.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;-A m -- specified Add membership features only&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;for all command run aspnet_reg.exe /?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;if you want create membership in your own sql data base run aspnet_regsql.exe with following parameters.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;aspnet_reg.exe -S (local) -d &lt;database&gt;-A m -U &lt;username&gt;-P&lt;password&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;to see the result of go to SQL server Open data base if you created on the existing batabase Membership related tables can see on that otherwise new database has been created on sql server named aspnetdb.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Within the Aspnetdb database, the following tables are created if they do not exist:&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;aspnet_Applications&lt;br /&gt;aspnet_Membership&lt;br /&gt;aspnet_SchemaVersions&lt;br /&gt;aspnet_Users&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;5. Grant Database Access to Your Web Application Account&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Your Web application process account requires access to the Aspnetdb database(or your own databse). If you run your application under Microsoft Internet Information Services (IIS) 6.0 on Windows Server 2003, the NT AUTHORITY\Network Service account is used by default to run Web applications.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;6. Configure Membership setting on Web.Config&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In the Web.config file, add a connection string similar to the following to point to your membership database.&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;code&gt;&amp;lt;connectionStrings &amp;gt;&lt;/code&gt; &lt;code&gt;&amp;lt;add name="MyConStr" connectionString="Initial Catalog=aspnetdb;data source=localhost;Integrated Security=SSPI;" /&amp;gt;&lt;/code&gt; &lt;code&gt;&amp;lt;/connectionStrings&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;connectionstrings&gt;&lt;span style="font-family:verdana;"&gt;In this example, &lt;strong&gt;MyConStr&lt;/strong&gt; is the name you will use for this connection. Set the connectionString attribute to the membership database you created earlier.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:Verdana;"&gt;Add &lt;code&gt;&lt;span style="font-size:100%;"&gt;&amp;lt;Membership/&amp;gt;&lt;/span&gt;&lt;/code&gt; to config file after then &lt;code&gt;&lt;span style="font-size:100%;"&gt;&amp;lt;authorization/&amp;gt;&lt;/span&gt;&lt;/code&gt; element&lt;/span&gt; . &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="font-family:courier new;"&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&amp;lt;membership defaultProvider="MySqlMembershipProvider" &lt;/code&gt;&amp;gt; &lt;code&gt;&amp;lt;providers&lt;/code&gt;&amp;gt; &lt;code&gt;&amp;lt;clear/&lt;/code&gt;&amp;gt; &lt;code&gt;&amp;lt;add name="MySqlMembershipProvider" connectionStringName="MyConStr" applicationName="MyAppName" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&lt;/code&gt;&amp;gt; &lt;code&gt;&amp;lt;/providers&lt;/code&gt;&amp;gt; &lt;code&gt;&amp;lt;/membership&lt;/code&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;check the connectionStringName attribute to the same name ("MyConStr") you have assigned in the above connectionStrings section. Also set the applicationName attribute to a unique value representing the application. User details are organized by application name within the membership database. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Note You must set the defaultProvider attribute of the &lt;code&gt;&lt;span style="font-size:100%;"&gt;&lt;&lt;strong&gt;membership&lt;/strong&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt; element to point to the provider definition. The login controls use this attribute to determine which property to use by default. However, these controls also expose a MembershipProvider property that lets you use non-default providers with the controls. While you can also set the MembershipProvider property of the login controls, it is good practice to set the defaultProvider attribute.&lt;/span&gt;&lt;br /&gt;&lt;add connectionstring="Initial Catalog=aspnetdb;data source=(local);Integrated Security=SSPI;" name="MyAppConnstr"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;/connectionstrings&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1529598984330847935-7127508857963490442?l=wijethilake.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wijethilake.blogspot.com/feeds/7127508857963490442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1529598984330847935&amp;postID=7127508857963490442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/7127508857963490442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1529598984330847935/posts/default/7127508857963490442'/><link rel='alternate' type='text/html' href='http://wijethilake.blogspot.com/2007/03/form-authentication-with-sql-membership.html' title='Form Authentication with SQL Membership provider'/><author><name>Lakshman Wijethilake</name><uri>http://www.blogger.com/profile/05288022934409818367</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
