This project originally started out as a test application for trying things out in WPF and MVVM (specifically modal dialog boxes), as well as to create an easier-to-use tool for managing the aspnetdb credentials store.
The core functionality is inspired by the IDesign
WCF Credentials Manager, which is a Windows Forms application for managing credentials stores based on the
ASP.NET providers. Having used it in a production environment for several months, users had highlighted several usability issues. The specific shortcomings that I set out to address
- Poor responsiveness due to synchronous WCF calls
- Lack of intuitiveness in user interface particularly when moving between applications
- Too much effort required when assigning users to roles (e.g. no support for assigning multiple users to multiple roles)
However, it should be noted that the IDesign application was a vast improvement on the
WSAT tool and this application is simply an evolution of that.
I have made some minor modifications to the WCF service, but otherwise it remains as per the original IDesign code. Because of this, the IDesign licence is included. The modifications are:
- Data access is now done using Linq to SQL (although now it could do with being EF)
- Some of the methods have been altered to more logically reflect user and password updates according to the web.config settings
- Inclusion of a PasswordSettings DTO to reduce the number of calls to the service when initialising applications
- Addition of fault contracts on some of the operations
- Project type changed to a WCF/Web project (instead of self-hosting)
To run this application, you will need to do the following:
- Download the source code
- Set up the ASP.NET provider database (aspnetdb) by following the instructions
- Update the aspnetdbConnectionString connection string in the web.config of the CredentialsService project to point to the appropriate aspnetdb database
There is a SvcUtil build event in the CredentialsManager project which refreshes the proxy class (ServiceProxies.cs). It's a bit superflous because the service isn't likely to change, but it's a handy way of keeping the proxy synchronised with the service
that doesn't involve the mess included with using 'Add Service Reference'. The build won't fail if the event does because of a fudge that I've put in the project file (see
here for more details), but if your path to SvcUtil is different from the one I've put in the build event then SvcUtil won't run. It's nothing to lose sleep over.
Also, the app.config file in the CredentialsManager project is selected based on the build configuration. So if you want to make changes to app.config then make it in the app.config.xxx file (where 'xxx' is the build configuration), as the app.config
file gets overwritten by this at build time.
Acknowledgements (external sources)
This project makes use of code from several sources – where appropriate this has been acknowledged in the code. The following is a summary:
||WCF service and MetadataHelper class (from ServiceModelEx library)
The MetadataHelper is used in exactly the same way as in the original credentials manager (i.e. to validate the service contract)
The WCF service is the IDesign one with modifications
This isn't the Codeplex version, but it does use most of the same classes. The ServiceContainer has been taken from an article that Josh Smith wrote for CodeProject.
The MediatorMessage is the original implementation by Marlon Grech (instead of the Messenger class used in the current Codeplex download). It's all kinda the same thing from the same clever people.
|Functional Fun blog
||Most of the helpers and attached properties
||These are all acknowledged in code - suffice to say that without Samuel Jack's posts, my profanity to code ratio would be much higher
||Application, Role, and User icons
||This is a really nice site, not least for the multitude of options it has for downloading XAML-based images. Viva vector graphics!
||The build event for the WPF project uses the technique described in Scott's article to facilitate publishing to multiple environments. There is only a Debug configuration at the moment but I left this in because it's a handly little trick.
||Where would any of us be without Scott Hanselman? What a top bloke!
Many thanks to all concerned. Thanks also to the army of helpful folks on Stack Overflow.