Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
System.Web.Security Roles class
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01303990
Message ID:
01304039
Views:
15
>>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.

Few more questions on this, if I may. I'm now correctly getting the exceptions, but I'm wondering:

1) What exactly is happening behind the scenes - I'm not yet sure I'd like to get reflector, though I may later decide I really need it.

2) Is there a way to show this exception in an alert rather than label on the form? Because with the label I have a problem - I need to clear it if I'm doing somehting else and I'm not sure how to achieve it yet (obviously don't want to clear it from multiple places).

Or how do you usually inform a user when something is wrong?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform