Thinktecture.IdentityManager as a replacement for the ASP.NET WebSite Administration tool
In ASP.NET 2005 (v2 timeframe) there was a web-based tool called ASP.NET Website Administration tool that folks could use the edit users and generally administer the ASP.NET Membership database. This useful tool was removed in 2012 and is still missed.
Since then, ASP.NET has introduced ASP.NET Identity and community member Brock Allen created IdentityReboot with some significant improvements and extensions. Brock Allen and Dominick Baier have gone even further and created Thinktecture IdentityManager. It's the beginnings of a nice bootstrapped replacement for the missing ASP.NET Website Administration Tool. It's nicely factored and supports both ASP.NET Identity and their alternative called MembershipReboot.
I cloned Thinktecture.IdentityManager and ran it under Visual Studio 2013.2. It's nice when projects just clone cleanly and build. You'd be surprised how often that's not the case.
Thinktecture.IdentityManager plugs into the ASP.NET middleware pipeline, so switching the sample host to use ASP.NET Identity rather than their alternative MembershipReboot was as easy as commenting out a line and adding a line as seen below.
public class Startup
public void Configuration(IAppBuilder app)
//UserManagerFactory = Thinktecture.IdentityManager.MembershipReboot.UserManagerFactory.Create
UserManagerFactory = Thinktecture.IdentityManager.AspNetIdentity.UserManagerFactory.Create
Just run it and you'll get a nice Bootstrapped interface for creating, editing, and deleting users from your Identity database.
Here you can see those same users in the SQL database that ASP.NET Identity uses.
The whole application is written as a Single Page Application with an ASP.NET Web API handling the backend with Angular.js on the frontend.. You could run this application as it's own site and lock it down, of course, or host it within your existing website at something like /admin.
Serving Embedded Assets
Unrelated to the core functionality of Thinktecture.IdentityManager, one cool piece of functionality worth noting is how they are storing the HTML, CSS and other resources as embedded resources inside the Thinktecture.IndeityManager.Core assembly. This is not something you'd necessarily want to do yourself, but considering that they've got a nice embedded "manager" that they'll want to plug into other websites easily without causing issues with file dependencies, it's quite clever.
Here's the static page controller:
public class PageController : ApiController
public IHttpActionResult Index()
return new EmbeddedHtmlResult(Request, "Thinktecture.IdentityManager.Core.Assets.Templates.index.html");
Then later in EmbeddedHtmlResult:
public static HttpResponseMessage GetResponseMessage(HttpRequestMessage request, string name)
var root = request.GetRequestContext().VirtualPathRoot;
var html = AssetManager.LoadResourceString(name);
return new HttpResponseMessage()
Content = new StringContent(html, Encoding.UTF8, "text/html")
Then later, all the CSS and JS are handled by the ".UseFileServer()" extension from Microsoft.Owin.StaticFiles, and then Microsoft.Owin.FileSystems handles the mapping the whole of the /assets URI space over all the resources
RequestPath = new PathString("/assets"),
FileSystem = new EmbeddedResourceFileSystem(typeof(AppBuilderExtensions).Assembly, "Thinktecture.IdentityManager.Core.Assets")
RequestPath = new PathString("/assets/libs/fonts"),
FileSystem = new EmbeddedResourceFileSystem(typeof(AppBuilderExtensions).Assembly, "Thinktecture.IdentityManager.Core.Assets.Content.fonts")
It's nice and clean, and a cool reminder about what you can do with a nicely factored system and a decent middleware pipeline.
A bright future
If you've got a ASP.NET system and are looking for a flexible and simple web-based administration tool for your Identity system, you should totally check out Thinktecture.IdentityManager. It looks like the team is gearing up for the possible release of this project as NuGet, so may have that to look forward to as well!
Remember that when people create cool projects like this, they are often doing this as volunteers out of the kindness of their hearts. They are often looking for feedback and comments, sure, but also validation of their idea as well as help. Open source help can come in the form of Pull Requests, Bugs and Issues, Documentation, Build Servers, and more. Head over and "star" the GitHub Thinktecture.IdentityManager project, and check it out!
Sponsor: A big thank you to my friends at Octopus Deploy. They are sponsoring the blog feed this week. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases of ASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
ASP.NET middleware pipeline
*cough* owin middleware pipeline :)
Nice stuff from the ThinkTecture folks as usual.
Ilaro.Admin has more complex configuration, but thanks that is also more flexible, more info about it you can find on github.
Unfortunately there is a lot of stuff to do and probably there are many of bugs so Thinktecture.IdentityManager for now is better solution for identity management, but for everything else you can use Ilaro.Admin.
My project it's also open source, so I would be very happy for any advise and help in creating it.
I'm sorry for this little advertisement, but I believe that my comment is valuable and can help someone.
Please check out the following section for migrating to ASP.NET Identity from Sql Membership http://www.asp.net/identity/overview/migrations
Also http://www.asp.net/identity/overview/getting-started has some good tutorials which give you an overview of Identity and how to get started with Identity in an Empty Application.
This is an awesome solution for people who love old security tool:
ASP.NET Website Administrator Tool in VS 2013
We are stuck on .Net 4.0 for the moment any suggestions on how we can integrate the new tools in .Net 4.5.
Comments are closed.
iisexpress.exe /path:C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/webadmin" /port:12345 /clr:4.0 /ntlm
and then in your browser:
I blogged about it here http://www.jphellemons.nl/post/missing-aspnet-webadmin-configuration-option-in-visual-studio-2013