Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System.Web.Security Roles class
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01303990
Message ID:
01304027
Vues:
19
>>Hi everybody,
>>
>>The new question, if I may.
>>
>>1. How can I see the actual code of the system classes?
>
>This only recently became available. It requires VS 2008 to do this automatically, here's a link which goes into detail about how to get it all installed:
>
>http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx
>
>If you don't/can't go that route, download Reflector from www.aisto.com/roeder/dotnet/ - it will let you open any .NET assembly and it will let you view a decompiled version of the source code.
>
>>2. Is the common practice to just trap the exceptions, say, if I want to add a user(s) to the role(s) and some of them are already in that role, I'm currently getting an exception with some helpful message.
>
>Yes, it's standard practice to only trap exceptions which you can handle, which usually isn't just "Exception", but a specific type of exception (or exceptions). Having said that, sometimes you have to capture the generic "Exception" type because no other (more specific exception) type is available.

Thanks a lot for the link to the blog. Wow, yes, I'd love to start using VS2008 instead of VS2005.

2. I'm guessing I need to catch Provider exception and general too. Strange, that MS sample didn't show the correct code, so now I have to do a bit of work myself. <g>

BTW, googling doesn't provide losts of answers here. I guess, this is a relatively new method and probably not many people run into this problem?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform