Managing ASP.NET Membership and Roles without Visual Studio

I made a conscious decision to not include any user management features in IdentityServer. It’s a token service. In addition it is based (at least by default) on the standard ASP.NET membership, roles and profile features. So there should be plenty of admin tools out there, right?

In fact there aren’t. And it is more painful as it should be to manage a provider database. There is a tool that is built into Visual Studio. But if you simply want to deploy the binaries, that is not really an option. There is an administration front-end in the IIS manager – but it only works for .NET 3.5 applications. That’s silly.

Today I got this questions again: “How do I create my first user?”

In lack of a better solution I wrote a little batch file that starts the admin web site manually. After that you can use the browser to navigate to the site and manage your users and roles. This is how I start the server on my machine via PowerShell (on one line – might need tweaks for your installation):

& ‘C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.EXE’ /path:”C:\Windows\
Microsoft.NET\Framework64\v4.0.30319\ASP.NETWebAdminFiles” /port:8080 /vpath:”/asp.netwebadminfiles”

Afterwards you can navigate to the site using this URL:



This entry was posted in ASP.NET, IdentityServer. Bookmark the permalink.

9 Responses to Managing ASP.NET Membership and Roles without Visual Studio

  1. bronumski says:

    I am working on an Open Source project for this very issue. It is a desktop application that is installed via ClickOnce, When it loads you point it at the web.config of the site you want to manage and it loads up the membership data. It is for the very scenario you mention above, “how do I create my first user?”. Or I don’t want or need membership management in my web .application,

    • Hi,

      interesting. When I try it with the identity server web.config – i get “Invalid provider type”.

      • bronumski says:

        Do you have a CodePlex login, could you post a copy of your web.config (less anything personal) onto the discussion board so that I can have a look at it? The project is still in Beta and we have only tried it with our web sites which tend to use the older SqlMebershipProvider and I am really keen to try it out with other environments.

      • bronumski says:

        I have released a new version which supports the DefaultProviders and CustomProviders. It also accounts for you not using a profile provider. There is one caveat, if you are using SqlCE and the DataDirectory for the path name then it will try and load the sqlce database relative to the application. I have raised an issue for this but it is not something I wanted to try and tackle right now.

        If you have time please give it a try and let me know how you get on. If you open up the application it should automatically upgrade.

  2. bronumski says:

    Thanks for the web config. I was easily able to reproduce it. Basically we have not used the Default providers so I never tried it before. I have been able to get it working locally so I will deploy fix once I have a cleaner solution. You have also helped identify two other issues, one is Custom Providers and the second is not everyone uses the role or profile providers.

  3. I tried the latest version. Still no luck. Now I get a FileNotFoundException for the Entitiy Framework assembly..

  4. Pingback: Running ASP.NET admin site from command line - Shawn Cicoria - Site Home - MSDN Blogs

  5. Pingback: Running ASP.NET admin site from command line - Shawn Cicoria - CedarLogic

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s