Skip to main content

What is Assembly and what is the different type of assemblies .Net?


An assembly may be Public or Private. A public assembly is also called a Shared Assembly.” 

  • The .NET assembly is the standard for components developed with the Microsoft.NET. 
  • Dot NET assemblies may or may not be executable, i.e., they might exist as the executable (.exe) file or dynamic link library (DLL) file.
  • All the .NET assemblies contain the definition of types, versioning information for the type, meta-data, and manifest. The designers of .NET have worked a lot on the component (assembly) resolution.
Advantages of Assemblies
  1. In the case of DLLs if a DLL has to be shared with some other application, it has to be registered in that particular machine. But, In the case of Asp.net assemblies there is no such type of registration required. Here we just need to do is to copy the assembly and put in the bin directory of the application that is going to use it.
  2. If we need to share a particular assembly with any other applications. we can do so by placing the assembly in the Global Assembly Cache (GAC). But before we going to do it we need to give a strong name to that assembly.Strong name is similar to GUID(It is supposed to be unique in space and time) in COM, components.Strong Name is only needed when we need to deploy assembly in Global Assembly Cache (GAC).Strong Names helps GAC to differentiate between two versions.Strong names use public key cryptography (PKC) to ensure that no one can spoof it.PKC use public key and private key concept.
  3. Another advantage of using ASP.Net assemblies is the ability to read the contents of an assembly. Each assembly has a manifest that has details about the assembly itself.
  4. The System.Reflection namespace has classes like Assembly which can be used to get the details of the assembly and with that it is also possible to load an assembly dynamically at runtime.

There are three types of assemblies in .NET
  • Private Assemblies
  • Public/Shared Assemblies.
  • Satellite Assembly
Private Assemblies

Is the assembly which is used by application only, normally it resides in your application folder directory.

There is no version constraint in private assembly.


If an assembly is copied in to the respective application in which we would like to use is known as local assembly. if any changes made to the copy that will not reflect the copies in other applications.


 Public Assemblies

  • It resides in GAC, so that anyone can use this assembly. Public assemblies are always share the common.
  • It has version constraint.
  • This public assembly is stored inside the global assembly cache or GAC.GAC contains a collection of shared assemblies.
  • If an assembly is copied into the global place and reference is used from all other applications then this is called public or global assembly..if we want to copy assembly in global place we have to create strong name by using sn.exe.
Satellite Assembly

Satellite assemblies are used to build multi-linguistic applications. Application which has built in supportive of more than one human readable language is known as multi-linguistic applications.
  • Satellite Assemblies doesn’t contain any Data
  • Satellite assembly is containing cultural information.
  • Satellite assembly mainly used for to display information based on the Cultural setting of browser or region.

Suppose you developed your application in an English (en-US) locale. Now, your application has multilingual support. When you deploy your code in different location, for example in India, you want to show text, label messages in the national language (local language) which is other than English.

Satellite assemblies give this flexibility. You create any simple text file with translated strings, create resources, and put them into the bin\debug folder. That's it. The next time, your code will read the CurrentCulture property of the current thread and accordingly load the appropriate resource.
Please refer below URL for Satellite Assembly


Comments


  1. At Coepd (Center of Excellence for Professional Development) we practice Object-Oriented Programming concepts and mentor .Net Platform, C#.NET, ADO.NET which helps the attendees to build database-driven Web applications and Web Sites successfully. We also guide the attendees to develop web-based enterprise applications using ASP.NET and Visual Studio which comforts in developing the Web Services using .Net framework in Service-oriented Architecture. The Internship Program Also covers Frontend design technologies HTML, HTML5, CSS, CSS3, XML, Bootstrap, JQuery, Angular JS, and AJAX. Our collaborative ecosystem comprising of Partnerships with Software Companies enables real time software development life cycle experience.


    http://www.coepd.com/DotnetTraining.html

    ReplyDelete

Post a Comment

Popular posts from this blog

Connected and disconnected architecture in ADO.Net with Example

Connected Architecture of ADO.NET The architecture of ADO.net, in which connection must be opened to access the data retrieved from database is called as connected architecture. Connected architecture was built on the classes connection, command, datareader and transaction.  Connected architecture is when you constantly make trips to the database for any CRUD (Create, Read, Update and Delete) operation you wish to do. This creates more traffic to the database but is normally much faster as you should be doing smaller transactions. Disconnected Architecture in ADO.NET The architecture of ADO.net in which data retrieved from database can be accessed even when connection to database was closed is called as disconnected architecture. Disconnected architecture of ADO.net was built on classes connection, dataadapter, commandbuilder and dataset and dataview. Disconnected architecture is a method of retrieving a recor

HTTPHandler and HTTPModule in ASP.NET

If you want to implement pre-processing logic before a request hits the IIS resources. For instance you would like to apply security mechanism, URL rewriting, filter something in the request, etc. ASP.NET has provided two types of interception HttpModule and HttpHandler .   The web server examines the file name extension of the requested file, and determines which ISAPI extension should handle the request. Then the request is passed to the appropriate ISAPI extension.  For Example When an .aspx page is requested it is passed to ASP.Net page handler. Then Application domain is created and after that different ASP.Net objects like Httpcontext, HttpRequest, HttpResponse. HTTPModule: -    It's just like a filter. The Modules are called before and after the handler executes . -    HTTP Modules are objects which also participate the pipeline but they work before and after the HTTP Handler does its job, and produce additional services within the pipeline -  

ASP.NET Page Life Cycle with example

In this article, we are going to discuss the different methods and order they are executed during the load of an .aspx web page. Methods Description Page_PreInit Before page Initialization Page_Init Page Initialization LoadViewState View State Loading LoadPostData Postback Data Processing Page_Load Page Loading RaisePostDataChangedEvent PostBack Change Notification RaisePostBackEvent PostBack Event Handling Page_PreRender Page Pre Rendering Phase SaveViewState View State Saving Page_Render Page Rendering Page_Unload Page Unloading PreInit : The entry point of the page life cycle is the pre-initialization phase called “PreInit”. You can dynamically set the values of master pages and themes in this event. You can also dynamically create controls in this event.  Init : This event fires after each control h