Login Form Problems

@MH2ag that is not something that should take 1.5 years to achieve …
Following the docs you should be able to create a login page and restrict page functionality in about 30 minutes. It’s one of the most common tasks created by our users!

If you have any issue doing this, please open a new topic and explain the issues and error messages there, so we can check what’s wrong.

Hi @Teodor

thanks for your reply.

There is already a topic with my insert problem (and @wld ).

What am I referring to is the problem with MS SQL Server an ASP.NET

I didn’t have any problems with PHP and MySQL.

(I should have said I tried it 1 1/2 years ago and gave up :wink: as it was not my main focus)

1 Like

Have you followed this procedure to find the cause of the 500 error?

@MH2ag

We are already looking at the .net issues you and @wld reported.

1 Like

Hi Teodor

I have disabled custom errors enabled detailed errors also server side and client side debugging.

1 Like

@diggybob All looks good except you need to enable “Debug” option in server connect as well, just as explained in the first two steps here: Debugging Problems

Hi Teodor, followed that and am seeing this error in severconnectForm.js …

Just a thought, I was a bit confused over the initial setup of the form following your online guide. I ended up using just “form” as I could not find “Server Connect Form” in the collection could this be implicated?

That is not really the error. I see it now, as explained in the docs under the NETWORK > XHR tab…

It seems it cannot find the security provider called “loginSecProvider”. Can you check if there is such a security provider defined in your server action and that you uploaded all files to your server?

Hi Teodor, yes I had renamed the security provider to loginSec and it got crossed purpose somewhere. I have now made sure this is consistent and now I do get the Alert for Unauthorized but at the moment I am getting this for any user login I try even though I have double checked their credentials. This is a step forward, I have to find out now why it’s not validating the credentials properly. Do I need to set permissions?

What type of security provide are you using? - > single, list, database?

Database

Then if it reports wrong user data, probably it really receives wrong data.

Please double check if you properly selected the database columns for user/password.

I have selected the correct table and included the login fields id, username, password

see setup of connection and form

Could it be that the script is expecting id as well?

@diggybob no. The login only expects username and password.
Maybe you are just entering wrong data …

I have taken a screen shot of a selection of usernames and passwords from the table and none of them work I just always get “Unauthorized” for any.

I think I will go back to the start and build a second version from scratch making sure I am exact at every step in case I have left some rubbish script in there somewhere.

Hi Teodor

I have totally rebuilt the app about 4 times and always end up at the same place. Unable to login against the MS SQL database.

I have followed the instructions on the Wiki to the letter but still no luck. Previously I was getting no response from the form submission, now all I get is the Unauthorized Alert even though I am using the correct MS SQL credentials.

I am now convinced that the problem is not with the Wappler code but with the server itself. For some reason it is not allowing any attempt to Authenticate from my Wappler code. I have been onto the server IIS control panel and tried changing the Authentication settings, trying every possible combination. With some of these changes, I get a second Windows login form pop up over my form which also does not work. However now at least I do have the Alert running.

It seems that the Server is not testing the login against the database at all and is trying to authenticate as some form of local login.

For now, further development on my site must cease as the user login is the most fundamental part of the portal. I realise I can revert to a classic asp solution such as a pass-through page with a hand coded database lookup, session settings etc. much as I currently do but this means that Wappler would be of little help to me over say Dreamweaver.

I have now run out of ideas so if anyone else out there has faced this issue and found a solution I would love to hear about it.

Test site login page…

http://devtidyco.co.uk

Hi @diggybob

You should not enable this feature, it has nothing to do with the login form and login action you created. Please set your server settings back to default, so we can test what is wrong with your login action.