views:

369

answers:

1

Hello,

I am not sure how to phrase a good question, so I will just say what I am after!

I have to retool a web application for our vendors and part of that requires restricting content on a vendor by vendor basis. Looking at ASP.NET (MVC) this seems easy enough using the built in Authorization Filters and the IPrincipal and IIdentity interfaces (I haven't used them yet, just reading, so I may be using these terms incorrectly!).

What I'm not interested in doing is writing all the code for managing users and roles. I would love to be able to assume all of this is done for me by a third party application, and my code simply specifies roles required.

Now, I'm not exactly sure the product I am after, or if it even exists. Is this a CMS? Right now our vendor site uses a very old version of DNN. Some of our existing custom code is written as a module within DNN. I am not interesting in this type of solution at all. I want to be able to build a standard ASP.NET webapp and not be tied to a certain vendor 'module' definition. It seems like this should be possible if the CMS / Portal implement custom providers behind the ASP.NET provided API's, yah?

The primary (only) customer here is developers, if that makes sense.

Notes:

  • I really don't need a full blown CMS, which is why I'm confused on what type of product to search for. Some CMS functionality might be nice, but the site is only for very specific vendor interaction that is going to be 95% custom.

  • I see that ASP.NET provies a website administration tool, and that is cool, but doesn't solve the public facing aspects of user interaction.

A: 

ASP.NET provides extensive membership and role management APIs that are pretty easy to work with since version 2.0. They are available in ASP.NET MVC. Probably they do not require much more work than you would do anyway for styling or other stuff. But since you don't want to do it anyway, you can use a simple Web form with a Login control in your MVC app and make routing ignore that path with:

routes.IgnoreRoute("SignIn.aspx");

Just drag a login control to SignIn.aspx as you would in any Web form app.

Mehrdad Afshari
I've been reading about the Membership stuff in ASP.NET 2.0, but have to admit I'm still putting the pieces together. That said, I know I want to use them, I'm just hoping there is a product that already does everything so the only work I have is setting up my web.config properly.
eyston
Most portals/CMSes will do it. But probably taking the unnecessary bits out of them and integrating them with your app takes more work. In the meantime, I suggest copying and pasting the required code from ASP.NET MVC sample project or Oxite open source project (http://oxite.net)
Mehrdad Afshari