Private Constructor


What is Private Constructor? and it’s use?

Yes ,when a class declares only private instance constructors, it is not possible for classes outside the program to derive from the class or to directly create instances of it. (Except Nested classes)
Make a constructor private if:
– You want it to be available only to the class itself. For example, you might have a special constructor used only in the implementation of your class’ Clone method.
– You do not want instances of your component to be created. For example, you may have a class containing nothing but Shared utility functions, and no instance data. Creating instances of the class would waste memory.

What are server controls?


Plz can anybody tell what are server controls?

Hello , Friend , ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes.

Application and Session Events


What are application and Session Events ????????Give details!!!!!!

Hi Friend ,
Application events are raised for all requests to an application. For example, Application_BeginRequest is raised when any Web Forms page or XML Web service in your application is requested. This event allows you to initialize resources that will be used for each request to the application. A corresponding event, Application_EndRequest, provides you with an opportunity to close or otherwise dispose of resources used for the request.
Session events are similar to application events (there is a Session_OnStart and a Session_OnEnd event), but are raised with each unique session within the application. A session begins when a user requests a page for the first time from your application and ends either when your application explicitly closes the session or when the session times out.

Working of CAS!!!!!!!!!!!


How does CAS work?

Hello, Dear,the CAS security policy revolves around two key concepts – code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set.
For example, using the default security policy, a control downloaded from a web site belongs to the ‘Zone – Internet’ code group, which adheres to the permissions defined by the ‘Internet’ named permission set. (Naturally the ‘Internet’ named permission set represents a very restrictive range of permissions.)

Errors when I try to serialize a Hashtable


Why do I get errors when I try to serialize a Hashtable?

Actually ,XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction.

Assembly manifest & metadata?


Can anyone tell basic difference between assembly manifest & metadata?

Yes ,sure,assembly manifest – An integral part of every assembly that renders the assembly self-describing. The assembly manifest contains the assembly’s metadata. The manifest establishes the assembly identity, specifies the files that make up the assembly implementation, specifies the types and resources that make up the assembly, itemizes the compile-time dependencies on other assemblies, and specifies the set of permissions required for the assembly to run properly. This information is used at run time to resolve references, enforce version binding policy, and validate the integrity of loaded assemblies. The self-describing nature of assemblies also helps makes zero-impact install and XCOPY deployment feasible.
metadata – Information that describes every element managed by the common language runtime: an assembly, loadable file, type, method, and so on. This can include information required for debugging and garbage collection, as well as security attributes, marshaling data, extended class and member definitions, version binding, and other information required by the runtime.

Active Directory


What is Active Directory?

Hi , Basically ,Active Directory Service Interfaces (ADSI) is a programmatic interface for Microsoft Windows Active Directory. It enables the applications to interact with diverse directories on a network, using a single interface.

What is Pinvoke?


Can anybody tell What is Pinvoke?????????????/

Yes, Sure, Platform invoke is a service that enables managed code to call unmanaged functions implemented in dynamic-link libraries (DLLs), such as those in the Win32 API. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed.

Change the permission set


Yes u can, use caspol. If you are the machine administrator, you can operate at the ‘machine’ level – which means not only that the changes you make become the default for the machine, but also that users cannot change the permissions to be more permissive. If you are a normal (non-admin) user you can still modify the permissions, but only to make them more restrictive.

Note that because this is more permissive than the default policy (on a standard system), you should only do this at the machine level – doing it at the user level will have no effect