Tuesday, March 30, 2010

Non-Generic Vs. Generic Type

Non-GenericSimilar Generic Type
ArrayListList<T>
HashtableDictionary<TKey,TValue>
SortedListSortedList<TKey,TValue>
QueueQueue<T>
StackStack<T>
IenumerableIEnumerable<T>
ICollectionN/A (use IEnumerable<T>anything that
extends it)
N/AICollection<T>
IlistIList<T>
CollectionBaseCollection<T>
ReadOnlyCollectionBaseReadOnlyCollection<T>
DictionaryBaseN/A (just implement IDictionary<TKey,TValue>
N/ASortedDictionary<TKey,TValue>
N/AKeyedCollection<TKey,TItem>
N/ALinkedList<T>

Wednesday, March 10, 2010

ASP.NET Impersonation

It is an important security feature which have ability to control the identity under which code is executed. Impersonation is when ASP.NET executes code in the context of an authenticated and authorized client. By default, ASP.NET does not use impersonation and instead executes all code using the same user account as the ASP.NET process, which is typically the ASPNET account. This is contrary to the default behavior of ASP, which uses impersonation by default. In Internet Information Services (IIS) 6, the default identity is the NetworkService account.
Impersonation is disabled. This is the default setting. <identity impersonate="false">
Impersonation enabled. In this instance, ASP.NET impersonates the token passed to it by IIS, which is either an authenticated user or the anonymous Internet user account (IUSR_machinename). <identity impersonate="true">
Impersonation enabled for a specific identity. In this instance, ASP.NET impersonates the token generated using an identity specified in the Web.config file. <identity  password="password" impersonate="true" username="domain\user">