问题
I'm creating a silverlight for line of business application, and I'm using Forms Authentication.
For user management, I'm deciding between using the built-in "ASP.NET Web Site Administration Tool", or create my own custom thing in Silverlight (making this part of the application experience).
What are the pros and cons for each of the two approaches? and which do you think would be best?
回答1:
I just went through all of this, so I'll give the pros and cons I came up with:
ASP.NET Web Site Administration Tool
Pros:
- Already built, debugged, and ready to go.
- Complete feature set. User can add roles, users, and security to their heart's content.
Cons:
- It's not really meant to be used remotely. It's meant to be used locally from VS. Microsoft's official stance is: yeah you can use it remotely, but we're not going to tell you how or support it when you do.
- Non-integrated. So, the user logs into my Silverlight application to manage everything EXCEPT for other users, where they need to log-in to a completely separate system that looks nothing like mine? It's not a great system.
Roll your own Silverlight Version
Pros:
- Completely integrated system.
- Relatively easy to code, once you get the hang of it.
Cons:
- I could not find ANY open source projects that did this in Silverlight. Why? Is it recommended against? Is it just not done that often? I hate feeling like I'm doing something few people have tried before.
- Not debugged nor full featured, and I have to do it myself. Just getting the ability to create users with two roles was lengthy (although not hard). But I'm concerned: did I introduce any security holes? It's difficult to tell.
In the end, I made my own Silverlight version. Too many people had complained about my 'hacked-up' version (as they put it), and it left a bad enough impression on people that I ended up making my own.
来源:https://stackoverflow.com/questions/7058302/user-management-in-silverlight-create-custom-ui-or-use-asp-net-website-administ