Login Form Problems

Hi any ideas welcome on my latest issue: I am trying to get a login page against a database working without success. The page uses server connect form the validate the form entry against the database and either on success send to a dashboard page or else throw an alert.

My form send code is

<form id="form1" is="dmx-serverconnect-form" action="dmxConnect/api/data/Security/Login.asp" dmx-on:success="browser1.goto('dashboard.asp')" dmx-on:unauthorized="browser1.alert('Login not recognised')" onsubmit="" method="post">

When I click the button, nothing happens, however I have a custom error 500 email report with just the following error message in the email; generated by the processing script …/dmxConnect/api/data/Security/Login.asp

‘’’ 0x0)
, line 0’’’

I think this may mean that the script is returning success (0) but the Redirect or Alert never happen. Does this look like an issue with my form page or is it more likely to be the database conn?

I think I have mapped all the form fields to the database fields correctly in Security Provider.

Any thoughts welcome.

Bob

Sorry, form send code without Chevrons…

form id=“form1” is=“dmx-serverconnect-form” action=“dmxConnect/api/data/Security/Login.asp” dmx-on:success=“browser1.goto(‘dashboard.asp’)” dmx-on:unauthorized=“browser1.alert(‘Login not recognised’)” onsubmit="" method=“post”

It’s not because of the chevrons.
Just wrap your code with:

3 of these backticks:

`

not these single quotes / or doube quotes:

’

Can you provide a screenshot of the exact error message you see in your browser dev tools?

Hi Teodor

Yes I am on a mac so confusing quotes with backpacks sorry.

Anyway this is what I get in the email report.

The form sending page can be found at http://devtidyco.co.uk

That looks like some default error page by your hosting provider.
Can you somehow enable detailed error reporting on the server, or contact the hosting provider to ask them what is the exact error message?

Hi Teodor, it is our own server and I have set up detailed error reports. I also see this in the Browser javascript console.

Also it is a custom IIS 500 error page I have put in place myself.

Is it possible to disable the custom page and make sure detailed error reporting is enabled so i can see the exact error your server is returning?

Welcome to the club :slight_smile:,

I’m trying to do this since 1 1/2 years without success (with ServerConnect in Dreamweaver).

I’m struck with insert at the moment…

@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?