<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'membership'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=membership&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'membership'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Membership Provider should allow users to login with Email Address+Password instead of Username+Password</title><link>http://forums.asp.net/thread/3550321.aspx</link><pubDate>Sun, 06 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3550321</guid><dc:creator>PatrickRR</dc:creator><description>&lt;p&gt;The asp.net membership provider was designed in a way that it is very easy to add existing events to the control to allow users to login with their choice of email address or user name. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Login Page:&lt;/strong&gt; Add a new event handler to the login control: &lt;span class="" style="COLOR:#ff0000;FONT-FAMILY:;"&gt;&lt;span class="" style="COLOR:#ff0000;FONT-FAMILY:;"&gt;OnLoggingIn&lt;/span&gt;&lt;/span&gt;&lt;span class="" style="COLOR:#0000ff;FONT-FAMILY:;"&gt;&lt;span class="" style="COLOR:#0000ff;FONT-FAMILY:;"&gt;=&amp;quot;Login_OnLoggingIn&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In your code behind get the UserName for the email address by calling the procedure: &lt;span class="" style="FONT-FAMILY:;"&gt;aspnet_Membership_GetUserByEmail&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-FAMILY:;"&gt;&lt;strong&gt;2. Code Behind:&lt;/strong&gt; I Kept this very simple. If the user entered an @ in the user id, then I assume they entered an email address (you could use regex but why bother if you site does not allow emails for user ids). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-FAMILY:;"&gt;protected void Login_OnLoggingIn(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; if (Login1.UserName.Contains(&amp;quot;@&amp;quot;))&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;Login1.UserName =&lt;/strong&gt; MyDataLayer.GetUserIDFromEmail(Login1.UserName);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Calls Proc &lt;span class="" style="FONT-FAMILY:;"&gt;aspnet_Membership_GetUserByEmail&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-FAMILY:;"&gt;That is it! Your user is logged in....&lt;br /&gt;&lt;/span&gt;&lt;span class="" style="FONT-FAMILY:;"&gt;&lt;br /&gt;&lt;strong&gt;!!! Don&amp;#39;t forget the Recover Password page to work in the same manner&amp;nbsp;!!!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Add event handler:&amp;nbsp;&lt;/span&gt;&lt;span class="" style="COLOR:#ff0000;FONT-FAMILY:;"&gt;&lt;span class="" style="COLOR:#ff0000;FONT-FAMILY:;"&gt;OnVerifyingUser&lt;/span&gt;&lt;/span&gt;&lt;span class="" style="COLOR:#0000ff;FONT-FAMILY:;"&gt;&lt;span class="" style="COLOR:#0000ff;FONT-FAMILY:;"&gt;=&amp;quot;Recover_OnVerify&amp;quot;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="" style="COLOR:#0000ff;FONT-FAMILY:;"&gt;2. Code Behind&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;protected void Recover_OnVerify(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (PasswordRecovery1.UserName.Contains(&amp;quot;@&amp;quot;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PasswordRecovery1.UserName = MyDataLayer.GetUserIDFromEmail(PasswordRecovery1.UserName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;That is it... new password sent to user.&lt;/p&gt;
&lt;p&gt;This logic is implemented on &lt;a class="" href="http://www.mtrig.com/"&gt;MTR Investors Group&lt;/a&gt; a Stock Market Timing Model Site (&lt;a class="" href="http://www.mtrig.com/"&gt;mtrig.com&lt;/a&gt;) if you want to stop by and register (it is free). &lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Patrick&lt;/p&gt;</description></item><item><title>Using membership to protect non-aspx files.</title><link>http://forums.asp.net/thread/3544315.aspx</link><pubDate>Wed, 02 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3544315</guid><dc:creator>Grenville</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to find a way to protect pdf files (stored in their own directory) from being accessible to users not logged in via the .net membership method.&lt;/p&gt;
&lt;p&gt;I ntoice that if I drop a web.config into the directory banning all users with this&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;authorization&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;deny&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:red;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;users&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;*&lt;/span&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-GB;mso-fareast-language:EN-GB;mso-bidi-language:AR-SA;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-GB;mso-fareast-language:EN-GB;mso-bidi-language:AR-SA;"&gt;authorization&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-GB;mso-fareast-language:EN-GB;mso-bidi-language:AR-SA;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-GB;mso-fareast-language:EN-GB;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then the I can still access the pdf&amp;#39;s. If I put an aspx page within it then I&amp;#39;m redirected to my login page. It&amp;#39;s quite important that I protect the pdfs in this instance and I&amp;#39;m not sure how I can achieve that.&lt;/p&gt;
&lt;p&gt;If anyone has any experience with that, please let me know :) Thanks&lt;/p&gt;
&lt;p&gt;P.S. Thinking about if I was able to use membership an web.configs then how would you say ban all non-logged in users (I currently don&amp;#39;t have roles for standard users, so I can&amp;#39;t ban the roles)? Is it with;&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;deny&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:red;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;users&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;?&lt;/span&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Authentication and authorization</title><link>http://forums.asp.net/thread/3508922.aspx</link><pubDate>Thu, 12 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3508922</guid><dc:creator>karads008</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have an ASP.NET web appllication(deployed in web server) which will communicate with WCF service(in appserver)&lt;/p&gt;
&lt;p&gt;and in turn WCF service will&amp;nbsp;communicate with database(database server) and give the data back to the application.Earlier i was using membership feature of asp.net for authentication and authorization in web application.&amp;nbsp;To keep up with&amp;nbsp;our architecture, web server can not access database directly, so i moved memberhsip feature&amp;nbsp;from web application to WCF service.Now how do i need to implement authentication and authorization in web application for this scenario?&lt;/p&gt;
&lt;p&gt;i am a beginner in asp.net..so if anyone have any idea about this pls help me..or pls direct me to a proper article.&lt;/p&gt;
&lt;p&gt;thanks in advance!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Extending membership model but userid return zero using LINQ</title><link>http://forums.asp.net/thread/3501227.aspx</link><pubDate>Mon, 09 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3501227</guid><dc:creator>maxi_ng</dc:creator><description>&lt;p&gt;I want to implement a DAL to access and extend the ability of membership model.&lt;/p&gt;&lt;p&gt;I currently use userid of a membership as the FK for my objects which should belongs to a user/membership.&lt;/p&gt;&lt;p&gt;Since the userid is the PK for the membership, that&amp;#39;s why I use it. If membership has a membershipId, I will use that instead.&lt;/p&gt;&lt;p&gt;Then I come across two questions,&lt;/p&gt;&lt;p&gt;1. a user should have a membership in each application, how come the membership table is using userid as PK?&lt;/p&gt;&lt;p&gt;2. I am using LINQ instead of the membership API to get my user information, but the return aspnet_Membership object&amp;#39;s userid is zero GUID, why is that?&lt;/p&gt;&lt;p&gt;How can I get a aspnet_membership object with the correct userid?&lt;/p&gt;</description></item><item><title>Problem in Membership provider</title><link>http://forums.asp.net/thread/3501785.aspx</link><pubDate>Mon, 09 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3501785</guid><dc:creator>X-treme</dc:creator><description>&lt;p&gt;Dear All,&lt;/p&gt;&lt;p&gt;I am facing some problem with the asp.net membership provider. I am using createuserwizard for registration. In the wizard i have bound roles. One user can be assigned to multiple roles. If i use single role it works fine but if i assign a user in multiple roles then the problem arises. In the aspnet_users table two rows are inserted and in the aspnet_usersinroles table roles are inserting but the userid is not the actual userid which is created in aspnet_membership table. It takes the second one. The userid doesn&amp;#39;t have the reference in the aspnet_membership table I have tried with the aspnet webadmin files also. But same problem is happening there also. Please help me to solve this bug. If sample code is being posted it will help a lot.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Issues With Profiles on IE8 only</title><link>http://forums.asp.net/thread/3496842.aspx</link><pubDate>Thu, 05 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3496842</guid><dc:creator>VeX_Harbinger</dc:creator><description>&lt;p&gt;Howdy All,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m having an odd issue with Profiles on IE8 only and so far cannot find any info on the topic.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;This issue is only occuring in my Live env as well and not in my dev env.&amp;nbsp; You can see the issue here;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.tripatourium.com/"&gt;http://www.tripatourium.com/&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you click on either of the prints on the right hand side then, click on add to cart under the large picture.&lt;/li&gt;
&lt;li&gt;You will see the cart price (on the upper right) now reflects the change.&lt;/li&gt;
&lt;li&gt;Then if you click on the other print (not the same, I have to fix that pathing) you will see the cart value is now empty again.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;This does not occur in Moz or Chrome or in IE8 when testing locally.&lt;/p&gt;
&lt;p&gt;Any info would be great.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>When adding a new user with Membership.CreateUser, is not recording Password nor Role</title><link>http://forums.asp.net/thread/3480594.aspx</link><pubDate>Tue, 27 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3480594</guid><dc:creator>hnavarro</dc:creator><description>&lt;p&gt;I got the Success status but password record is not in aspnet_Membership and Role is not in aspnet_UsersInRoles.&lt;/p&gt;
&lt;p&gt;The user exists in aspnet_Users.&lt;/p&gt;
&lt;p&gt;What could be happenning?&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;This is my code...
&lt;p&gt;CurrentUser = Membership.CreateUser(txtUsuario.Text, txtPassword.Text, txtEmail.Text, &lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Who created the program?&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Horacio&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;True&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, Status)&lt;/font&gt;&lt;font size="2"&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;Roles.AddUserToRole(CurrentUser.UserName,&lt;/font&gt;&lt;/p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;User&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;</description></item><item><title>membership.getuser() retuerns null inside HttpModule</title><link>http://forums.asp.net/thread/3477333.aspx</link><pubDate>Mon, 26 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3477333</guid><dc:creator>Mehrdad201</dc:creator><description>&lt;p&gt;In my c# project , I have a class that is implemented from iHttpModule&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In begin_request event, I need to check user status. I mean I need to check wheather a user is logined or not.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;However a user is onlined, Membership.GetUser() returns null value. &lt;/p&gt;&lt;p&gt;Also User.Identity.Name returns null too.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is seriuos problem.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Anyone can help me?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I need to check is user logined or not inside httpModule&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks a lot for everybody&amp;#39;s help.&lt;/p&gt;</description></item><item><title>ActiveDirectroyMembershipProvider w/ ASP.NET MVC: LDAP works, but login fails</title><link>http://forums.asp.net/thread/3477141.aspx</link><pubDate>Mon, 26 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3477141</guid><dc:creator>twangoosen</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I am trying to get my &lt;u&gt;ASP.NET MVC 1.0&lt;/u&gt; application to work with the ActiveDirectoryMembershipProvider. In the application, I would like to use &lt;u&gt;form authentication&lt;/u&gt; to check against the active directory of our domain.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have modified my web.config according to this page: &lt;a href="http://msdn.microsoft.com/en-us/library/ms998360.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms998360.aspx&lt;/a&gt; . I will put the resulting web.config at the end of this post.&lt;/p&gt;&lt;p&gt;In my domain, the following ldap connection string applies: &lt;b&gt;LDAP://goldwing.2go-mobile.lan/CN=Users,DC=2go-mobile,DC=lan&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Using the &lt;u&gt;LDAP test tool&lt;/u&gt; from &lt;a href="http://www.infopathdev.com/files/folders/others/entry34376.aspx"&gt;http://www.infopathdev.com/files/folders/others/entry34376.aspx&lt;/a&gt; , I have confirmed that this string is correct; calling it for an existing user returns the available user details.&lt;/p&gt;&lt;p&gt;However, the membership provider fails to validate the user. It simply returns false on the &lt;u&gt;ValidateUser&lt;/u&gt;(username,password) call; no other errors or messages are provided.&lt;/p&gt;&lt;p&gt;How to proceed? Are there any debugging options or things to check?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Here are the relevant parts of my web.config file:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;pre name="code" class="c-sharp"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;
&amp;lt;configuration&amp;gt;
  &amp;lt;configSections&amp;gt;
  &amp;lt;connectionStrings&amp;gt;
    &amp;lt;add name=&amp;quot;ApplicationServices&amp;quot; connectionString=&amp;quot;data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true&amp;quot; providerName=&amp;quot;System.Data.SqlClient&amp;quot;/&amp;gt;
    &amp;lt;add name=&amp;quot;ADConnectionString&amp;quot; connectionString=&amp;quot;LDAP://goldwing.2go-mobile.lan/CN=Users,DC=2go-mobile,DC=lan&amp;quot; /&amp;gt;
  &amp;lt;/connectionStrings&amp;gt;
  &amp;lt;system.web&amp;gt;
    &amp;lt;!-- 
            Set compilation debug=&amp;quot;true&amp;quot; to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
    --&amp;gt;
     &amp;lt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;
      &amp;lt;forms loginUrl=&amp;quot;~/Account/LogOn&amp;quot; timeout=&amp;quot;10&amp;quot;  name=&amp;quot;.ADAuthCookie&amp;quot;
             requireSSL=&amp;quot;false&amp;quot; slidingExpiration=&amp;quot;true&amp;quot;
       enableCrossAppRedirects=&amp;quot;false&amp;quot;&amp;gt;
        &amp;lt;credentials passwordFormat=&amp;quot;SHA1&amp;quot; /&amp;gt;
      &amp;lt;/forms&amp;gt;
    &amp;lt;/authentication&amp;gt;
    &amp;lt;authorization&amp;gt;
      &amp;lt;deny users=&amp;quot;?&amp;quot; /&amp;gt;
      &amp;lt;allow users=&amp;quot;*&amp;quot; /&amp;gt;
    &amp;lt;/authorization&amp;gt;
    &amp;lt;membership defaultProvider=&amp;quot;MyADMembershipProvider&amp;quot;&amp;gt;
      &amp;lt;providers&amp;gt;
        &amp;lt;clear/&amp;gt;
       &amp;lt;add
       name=&amp;quot;MyADMembershipProvider&amp;quot;
       type=&amp;quot;System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, 
             Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot;
       connectionStringName=&amp;quot;ADConnectionString&amp;quot;
       maxInvalidPasswordAttempts=&amp;quot;1000&amp;quot;
       connectionUsername=&amp;quot;DOMAIN/Administrator&amp;quot;
       connectionPassword=&amp;quot;****&amp;quot;/&amp;gt;
      &amp;lt;/providers&amp;gt;
    &amp;lt;/membership&amp;gt;
    &amp;lt;profile enabled=&amp;quot;false&amp;quot;&amp;gt;
      &amp;lt;providers&amp;gt;
        &amp;lt;clear/&amp;gt;
        &amp;lt;add name=&amp;quot;AspNetSqlProfileProvider&amp;quot; type=&amp;quot;System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot; connectionStringName=&amp;quot;ApplicationServices&amp;quot; applicationName=&amp;quot;/&amp;quot;/&amp;gt;
      &amp;lt;/providers&amp;gt;
    &amp;lt;/profile&amp;gt;
    &amp;lt;roleManager enabled=&amp;quot;false&amp;quot;&amp;gt;
      &amp;lt;providers&amp;gt;
        &amp;lt;clear/&amp;gt;
        &amp;lt;add connectionStringName=&amp;quot;ApplicationServices&amp;quot; applicationName=&amp;quot;/&amp;quot; name=&amp;quot;AspNetSqlRoleProvider&amp;quot; type=&amp;quot;System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot;/&amp;gt;
        &amp;lt;add applicationName=&amp;quot;/&amp;quot; name=&amp;quot;AspNetWindowsTokenRoleProvider&amp;quot; type=&amp;quot;System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot;/&amp;gt;
      &amp;lt;/providers&amp;gt;
    &amp;lt;/roleManager&amp;gt;
&amp;lt;/configuration&amp;gt;

&lt;/pre&gt;&lt;br /&gt; 
&lt;/pre&gt;&lt;p&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Membership.DeleteUser(UserName); doesn't work</title><link>http://forums.asp.net/thread/3474279.aspx</link><pubDate>Fri, 23 Oct 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3474279</guid><dc:creator>lionelthomas</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;Have been following Scott Mitchell&amp;#39;s tutorials on Asp.net security&lt;/p&gt;&lt;p&gt;&lt;a title="Security Tutorials" href="http://www.asp.net/learn/security/?lang=cs"&gt;http://www.asp.net/learn/security/?lang=cs&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Everything seems to work fine until I came to delete a user and have run into this problem.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.Data.SqlClient.SqlException: The SELECT 
permission was denied on the object &amp;#39;sysobjects&amp;#39;, database 
&amp;#39;mssqlsystemresource&amp;#39;, schema &amp;#39;sys&amp;#39;.&lt;br /&gt;The SELECT permission was denied on the 
object &amp;#39;sysobjects&amp;#39;, database &amp;#39;mssqlsystemresource&amp;#39;, schema &amp;#39;sys&amp;#39;.&lt;br /&gt;The SELECT 
permission was denied on the object &amp;#39;sysobjects&amp;#39;, database 
&amp;#39;mssqlsystemresource&amp;#39;, schema &amp;#39;sys&amp;#39;.&lt;br /&gt;The SELECT permission was denied on the 
object &amp;#39;sysobjects&amp;#39;, database &amp;#39;mssqlsystemresource&amp;#39;, schema 
&amp;#39;sys&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;/p&gt;&lt;pre&gt;Line 95: &lt;br /&gt;Line 96:         // Delete the user&lt;br /&gt;&lt;font color="red"&gt;Line 97:         Membership.DeleteUser(UserName);&lt;br /&gt;&lt;/font&gt;Line 98: &lt;br /&gt;&lt;br /&gt;Checked the database and it deletes the records in the membership and user tables but hangs afterward.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m executing this on localhost under an administrator account with sysadm role on the SQL server.&lt;br /&gt;&lt;br /&gt;Don&amp;#39;t know what to try. Please help.&lt;br /&gt;Regards,&lt;br /&gt;Lionel Thomas&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;table bgcolor="#ffffcc"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;by the way how does one get rid of this yellow box I copied from my browser.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;</description></item></channel></rss>