Login Screen for the Flexviewer

34460
121
03-15-2011 10:52 AM
andrewj_ca
Occasional Contributor II
Just posted some code for a Flexviewer login screen.  I hope somebody can get some use from this.

http://www.arcgis.com/home/item.html?id=baebcaf317994d63902bc9735c0657e0
Tags (2)
0 Kudos
121 Replies
andrewj_ca
Occasional Contributor II
Code has been upated to include a sample asp web service for user validiation.  Please remember to specify from URL in the index.mxml file.  It currently says 'localhost'.  Cheers
0 Kudos
KenBuja
MVP Esteemed Contributor
This would be more useful in the ArcGIS Viewer for Flex forum
0 Kudos
andrewj_ca
Occasional Contributor II
This would be more useful in the ArcGIS Viewer for Flex forum


I agree to a certain extent.  The code I put up transcends the sample viewer.  This sample will work with any flex implementation.  Cheers and enjoy.
0 Kudos
MichaelMatela
New Contributor
Andrew,

I got the Login Screen up and running, however I can't get the "siteUsage.log" to update as connections are made or attempted. Is this setup to run out-of-the-box or is there something more I need to do first?
0 Kudos
IvanBaehr
New Contributor
Hi Andrew,

Great with a login widget. Will there be any chance that you post a compiled widget for flexviewer 2.2 in near future? We are looking forward to add the login widget to our flexviewer web map.

Ivan Baehr
Web Mapping Specialist
UNOSAT
0 Kudos
andrewj_ca
Occasional Contributor II
I will definately be doing more with this.  I have a few deadlines in the next couple months and it's a bit busy around here.  I'll do a fully configurable upload.
0 Kudos
JamesFaron
Occasional Contributor
I was able to successfully implement Andrew's asp.net web service to complete the login process. But, for the sake of demonstration, I would like to create several users in the users.xml, and return a value unique for each one, by for example using the GetUser function in vb. I am not a vb programmer, and thus would appreciate any help in modifying the Service.vb to return a value from the user's profile after the user is validated. I know this is not a vb forum, just thought I might get lucky.

The Flex angle is as follows: if I can return a value from the user profile, in my case a location code, I can assign it to a global variable in the index.mxml. I will then call that variable in a widget, in this case, to input the value in a feature's definition expression, so that only the data that the user is authorized to see will appear in the layer on the map. I can do this now if I input the literal, i.e. public var myGlobalVar:String = "142";

The Web Service is attached, from Andrews' download. ValidateUser will only return boolean value.

Thanks,
Jim Faron
0 Kudos
andrewj_ca
Occasional Contributor II
James,

Give this a try: new function called 'validatedUserInfo'.  It returns a string and has an addition input for 'returnColumn'.  Should work for you.
0 Kudos
JamesFaron
Occasional Contributor
Andrew,

Thank you for the script! It works perfectly.

Jim Faron
Austin Independent School District
0 Kudos