URL login to a direct detail page

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
lyctysplt
User
Posts: 15

URL login to a direct detail page

Post by lyctysplt »

I've enabled URL login and have tested it just fine on the login.cshtml page.. where you go login.cshtml?username=xxxx&password=XXX - that works. I'm trying to go to a direct link doing the same thing so /tabelview.cshtml?hardwareid=xxx&username=xxx&password=xxx - that doesn't seem to work.


motfs
User
Posts: 258

Post by motfs »

Only login page will have the code to check for username and password if you have enabled the option, "Allow login by URL". So, it will not work if the URL is not login page. You may consider to add the page as "Start page". See Generate Setting -> Start page in the help file for more details.


lyctysplt
User
Posts: 15

Post by lyctysplt »

What I'm trying to do is embed a URL into a QRCode for an inventory db - the thought was to embed a read only type user into the url to allow there to be some resemblance of security - Really I'm just trying to read in part of the url query string for a keyword I can come up with..


motfs
User
Posts: 258

Post by motfs »

You can add additional querystring to the URL, e.g. :

login.cshtml?username=xxxx&password=XXX&table="<redirectURL>"

Then, in Page_Load server event for login page (C#):

if (ew_Get("table") != "") ew_Cookie["lasturl"] = ew_Get("table"); // to set the URL


lyctysplt
User
Posts: 15

Post by lyctysplt »

Thanks - that did the trick.


Post Reply