• Posts: 2
  • Joined: 13/07/2016
I have my references and web.config set. I'm using the YAF providers. When I validate the user, if it's invalid it passes back false just fine. But if the login is valid, I get the "Object reference not set to an instance of an object".

Another odd thing is that I have to specify the ApplicationName in code, even though it is listed in the provider settings for the web.config:

<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
<clear />
<add name="YafMembershipProvider" applicationName="WebsiteIntegration" connectionStringName="yafnet"
requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider" />

Dim ymp As New YafMembershipProvider
ymp.ApplicationName = "WebsiteIntegration"
Dim test = ymp.ValidateUser(txtUsername.Text, txtPassword.Text)

Properties of the object also have the useSalt property set to false. So, I'm thinking the web.config isn't being read correctly?


  • Posts: 2
  • Joined: 13/07/2016
Classic case of overthinking it. The default provider is overwritten by YAF, so just use the built in System.Web.Security functions.

Working now. Carry on.

Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved