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