Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedCan't modify login logicCan't modify login logic
Previous
 
Next
New Post
5/30/2013 4:29 PM
 
Hello =)

I was asked to double check a user login using a web service. Today I was trying to change the login.ascx.cs code inside desktopmodules/amin/authentication (the default dnn authentication provider) but whenever I changed something suddenly the login page disappeared completely.

Do you know why this is happening? Also, is there a correct/better way to do so?

Thanks a lot =)

 
New Post
5/30/2013 5:07 PM
 

If its missing you have most likely got an error in the code or the markup .... But you should really never alter core code ... Instead you should implement these sort of changes in a custom module

 
New Post
6/3/2013 1:02 PM
 
No, I don't have any errors on my code. I checked like 100 times already with several single-code-changes that shouldn't affect functionality in any way.
That's why I asked if there was a better/correct way to do it. You said it's a custom module, so: how can I create a custom-login module?

Thanks a lot =)
Horacio
 
New Post
6/5/2013 3:31 PM
 

I think you may be able to 'extend' the default membership provider and override the ValidateUser method. This method returns a boolean value indicating if username and password supplied was correct. You could do additional processing before returning from this method.

First step is to write a new class extending/inheriting from SqlMembershipProvider (if that's the one set in your web.config) ideally in a separate library project. Next in that class, override the ValidateUser method and implement your checks there. Finally, reference your new provider class as the default provider in your web.config as: 

<membership defaultProvider="YourProvider" ...>

<add name="YourProvider" type="[class], [assembly name]" ... />

</membership>

My recommendation would be to add minimal new functionality and reuse what's already there.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedCan't modify login logicCan't modify login logic


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out