This is a sample application that I worked on that utilizes simple forms authentication to authenticate a 3rd party .NET application (in this case an ASP / C# solution) through the iMIS Public View. This method essentially sets Public Views as the authentication source in the web.config file so if the session is not set, it goes to Public Views and once a user logs in successfully, it passes the cookie information back to the sample application. Once the session expires, it goes through the entire process again. I see this as the simplest way to maintain iMIS as the a single login source for 3rd party web applications. Keep in mind that this only returns the unique Web Login value from iMIS so the appropriate table such as name_security or usermain will need to be queried to get the actual iMIS ID but that is something that is easy to do. Of course more elegant methods such as SOA are out there but I figured this is a good place to start especially for the smaller projects.
Contraints
1) Public Views and the 3rd party applicaton need to share the same domain - can have different host header or virtual directory. There is a new tag element that appears to allow authentication across domains but I have not tested it...http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx
2) This method returns the unique login so the iMIS ID will still need to be queried
Instructions
1) Save the attached files to your server/machine
2) Create an IIS entry - I did it as a virtual directory - that points to the root of the application
3) Get yourself a machine key - http:/aspnetresources.com/tools/keycreator.aspx or use the one I have in the application. You need to copy this machine key so is is inside the 'system.web' tag in your public view site web.config file so the encrypted cookie data can be accessed.
That is pretty much it! This is a VERY simple application but it works and can serve as a good example to vendors who will has seperate sites that will use Public Views to authenticate all users.
Since I am relatively new to the iMIS .NET technology, any and all advice/feedback is welcome.
| Attachment | Size |
|---|---|
| SampleFormAuth.zip | 5.27 KB |