<?xml version="1.0" standalone="yes"?> <NewDataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="user_validation" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="user_validation"> <xs:complexType> <xs:sequence> <xs:element name="uid" type="xs:long" minOccurs="0" /> <xs:element name="username" type="xs:string" minOccurs="0" /> <xs:element name="password" type="xs:string" minOccurs="0" /> <xs:element name="firstname" type="xs:string" minOccurs="0" /> <xs:element name="lastname" type="xs:string" minOccurs="0" /> <xs:element name="code" type="xs:string" minOccurs="0" /> <xs:element name="email" type="xs:string" minOccurs="0" /> <xs:element name="phone" type="xs:string" minOccurs="0" /> <xs:element name="creation" type="xs:dateTime" minOccurs="0" /> <xs:element name="configfile" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <user_validation> <uid>1</uid> <username>Blah Blah</username> <password>Pa$$w0rd</password> <firstname>first</firstname> <lastname>last</lastname> <creation>2011-09-05T00:00:00-05:00</creation> </user_validation> <user_validation> <uid>2</uid> <username>blah blah</username> <password>Pa$$w0rd</password> <firstname>first</firstname> <lastname>last</lastname> <creation>2011-09-05T00:00:00-05:00</creation> </user_validation> </NewDataSet>
Hi,
I have managed to create an ASP.NET wrapper application for my flex viewer application. Users and user access to different basemaps is built into SQL tables in the GIS database, there is a helpdesk function where 1st line suppport team can edit/create users and manage their access to basemaps without developer intervention. Passwords are encrypted by the .net app before being written to the database. This was designed for intranet use only.
Once a user is verified, they are presented with a choice of basemaps to load for the flexviewer app (they can only choose one, but may be entitled to see several). The map url they choose is then passed from the .net application to the flex viewer by using URL params. The flex viewer is actually embedded in an aspx page that sits within the .NET application project. There are also some code changes you need to make to the flex viewer out-of-the-box code to enable it to read the map url passed from the .net application.
There is plenty of scope to take what I have created and extend it / edit it to do other user specific processing in the flex application (ie load certain config files for particular users).
If anyone is interested I can make the .NET code available together with the stored procedures for creating the authorisation tables in SQLServer, but I would suggest that non-technical users and people with zero .NET/ SQL experience would maybe find this a little beyond their capability and should consult their development team. There is probably a much neater way to do the user authentication by using the built in .NET API's for user/role authorisation. However in our case we needed to be able to manage users who are outside the company and have no windows domain accounts with us, but are able to access our intranet and this was the path of least resistance.
Also please note, to make the application work properly, there are changes that need to be made at the flex end in order for the URL params passed from .NET wrapper to be read. There is definitely scope for this code to be played with to enable different configs to be loaded for different users or any other user specific actions to be executed in the flex application based on URL parameter info passed through.
Greg,
Yes changing it to visible.Login="false" does work as a workaround but If you are like me and want to load a specific Config.xml file based on the user that logs in then that is not a feasible workaround.
Steph,
The name of the config.xml is returned from the ASP.net webservice when a user logs in and that is then used by the index.mxml file to load the proper config.xml in the viewer. I have no time to walk anyone through the code or steps but the necessary code and changes to the viewer are available at this url:
http://gis.calhouncounty.org/devsummit2012
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
Thanks, I will have a look at it and see what I can do! Much appreciated 🙂