Posted By: Galo | Jul 22nd, 2008 @ 7:00 AM
page 1 of 1
Comments: 3 | Views: 2011
Hi gang,

I have a question and no one seems to have an awnser, so ofcourse the last thing one tries is the 9th channel Tongue Out
Let's cut to it...

I made a Silverlight application that uwses a service, the service is a WCF service, and as you might know we have a default Membership provider comming with WCF, which are

System.Web.ApplicationServices.AuthenticationService
System.Web.ApplicationServices.ProfileService
System.Web.ApplicationServices.RoleService

So, knowing this, we have a new challenge of creating a user login based on Silverlight & WCF

AuthenticationServiceClient client = new AuthenticationServiceClient();
client.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(LoginCompleted);
client.LoginAsync(tbxUsername.Text, Password.Value, "", true, tbxUsername.Text);

Jippee,.. all good IF we only had a locale database running in the App_Data folder, and since im an employee of enterprise X and we have our databases running on a different server which does use the default asp_net authentication im pretty f****d no, hmmm we could create our own custom membership providers configured in the web.config of my service layer, yeehaaa,... let's do that...

<roleManager enabled="true" defaultProvider="Role">
<providers>
<add name="Role" type="X.Model.Provider.Role" connectionStringName="SqlXConnectionString" applicationName="/X.GUI"/>
</providers>
</roleManager>
<membership defaultProvider="Membership" userIsOnlineTimeWindow="10">
<providers>
<add name="Membership" type="X.Model.Provider.Membership" connectionStringName="SqlXConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordStrengthRegularExpression="" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" applicationName="/X.GUI"/>
</providers>
</membership>
<profile defaultProvider="Profile" enabled="true"><providers>
<add name="Profile" type="X.Model.Provider.Profile" connectionStringName="SqlXConnectionString" applicationName="/X.GUI"/>
</providers>
<properties>
<add name="Color" type="string" defaultValue="Red" />
<add name="Naam" type="String" serializeAs="String"/>
<add name="Omschrijving" type="String" serializeAs="String"/>
<add name="Intern" type="Boolean" serializeAs="String"/>
<add name="Actief" type="Boolean" serializeAs="String"/>
<add name="MedewerkerNummer" type="String" serializeAs="String"/>
<add name="FunctieNiveau" type="Int32" serializeAs="String"/>
<add name="Direct" type="Boolean" serializeAs="String"/>
<add name="FTE" type="String" serializeAs="String"/>
<add name="PercDirect" type="String" serializeAs="String"/>
<add name="PercIndirect" type="String" serializeAs="String"/>
</properties>
</profile>

So, i try the WSAT throught the ASP.Net Configuration, and yes, i have all my data correctly in front of me, my users, roles and application settings, and one would think he is done... but he aint, cause it aint working, not at all.... i tryt to log in with the right credentials, but the e.Result keeps returning false in the OnCompleted method.

How come, does anyone know what im looking over or what i've done wrong, your help would be apreciated

thanks in advance!
 

Maddus Mattus
Maddus Mattus
Do, or do not. There is no try. - Yoda
Try running a Sql Profiler against the server to see if any of the queries get fired against the database.
Maddus Mattus
Maddus Mattus
Do, or do not. There is no try. - Yoda

Veel succses met je applicatie!

Good luck with the application!

page 1 of 1
Comments: 3 | Views: 2011
Microsoft Communities