When we have two version of the same assembly in GAC we need to use binding redirect tag and specify the version we want to use in the new version property as shown in the below “app.config” file. If we have two versions of the same assembly in GAC how to we make a choice? So the common way of deploying GAC DLL in production is by using windows installer. When we have many DLL’s to be deployed we need to create setup and deployment package using windows installer. One you have installed the assembly the DLL can be seen in ‘c:\windows\assembly\’ folder. So to register an assembly in to GAC go to “Visual Studio Command Prompt” and type “gacutil –i (assembly name)”, where (assembly name) is the DLL name of the project. You can use the ‘GacUtil’ tool which comes with visual studio. How to add and remove an assembly from GAC? If the assembly is private then a simple delete of assembly the assembly file will remove the assembly. If the assembly has some special security, requirements like only administrators can remove the assembly.If the application has to be shared among several application which is in the same computer.GAC is used in the following situations:. GAC (Global Assembly Cache) is where all shared. The private key is stored in a secured location and when the DLL is about to be deployed on production the key is injected for further security. You only share the public key with your developers so that they can work seamlessly. The strong name key has two keys public key and private key. Strong name protection is good from external hackers but what if your own developers think of doing something mischievous. This authenticity is verified by using strong names. The whole point about strong names is to ensure that the clients (UI, External components etc) who is consuming the DLL knows that the DLL was published from a valid source. In this article we will look into further 20 basic C# interview questions.Īlso see our YouTube C# Interview Questions video for elaborated answers. This article is continuation to the previous C# Interview Q
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |