Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

Silverlight5 and aspnet membership provider

$
0
0

 I have a silverlight application that will act as a webpart in my sharepoint site. I would like to use the aspnet membership provider using the wcf services. 

I have create and configure the wcf for the silverlight. To certain extend the application is working fine . My silverlight application is communicating with wcf service WCF service is communicating with the aspnet member ship provider.

The basic problem is that When I created the user the using membership.Provider.CreateUser it returns success but there is no it in the aspnet_users or aspnet_membership table .  

following is the service function  file 

 public System.Web.Security.MembershipCreateStatus CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer)
        {
            MembershipCreateStatus status;
            MembershipUser user;
            Membership.Provider.CreateUser(username, password, email, passwordQuestion, passwordAnswer, true, Guid.NewGuid(), out status);
            return status;
        }


<membership ><providers ><add name="SqlProvider"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             connectionStringName="MembershipConnection"
             enablePasswordRetrieval="false"
             enablePasswordReset="true"
             requiresQuestionAndAnswer="true"
             applicationName="XXX"
             requiresUniqueEmail="false"
             passwordFormat="Hashed"
             maxInvalidPasswordAttempts="5"
             minRequiredPasswordLength="1" 
             minRequiredNonalphanumericCharacters="0" 
             passwordAttemptWindow="10" 
             passwordStrengthRegularExpression=""/></providers></membership><roleManager enabled="true"  defaultProvider="RoleProvider"><providers><add connectionStringName="MembershipConnection"
       applicationName="XXX"
	      name="RoleProvider" 
      	type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral,  PublicKeyToken=b03f5f7f11d50a3a"/></providers></roleManager>

Just to be safe side I have decided to get all the user if they are created for that I use

 public string getUser()
        {

            string str = "H";
            try
            {
                     foreach( MembershipUser u in Membership.GetAllUsers() )
                        {
                             str+=u;
                         }

            }
            catch (Exception er) { return "error"; }
            return str;
        }

the above function returns only those users that I have created Using the function.  Where is all these users are created ?




.NET is my new target framework


Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>