ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Remoting
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
How to register a shared assembly ?
 Question Submitted By :: Mathur
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to register a shared assembly ?
Answer
# 1
To work with .Net commands directly in Command prompt, we 
have to set the path as below:

1)	Right Click on ?My Computer? and go to ?Properties? 
in the Context Menu.
2)	In the system properties, go to Advanced Tab
3)	Click on the Button ?Environment Variables?. In the 
System Variables, double click Path and a popup with Edit 
System Variables will appear. In the variable value: 
include the path as below:
;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program 
Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

The above paths where the .net tools (sn.exe, gacutil.dll) 
all are found.


To generate Strong Name Key:

Example:

1)	Create an folder GACKey in C:
2)	Open Command Prompt.
3)	Create SN key as below
4)	C:\>sn ?k SampleKey.snk
5)	Now if the key was successfully generated, then 
command like ?key pair written to SampleKey.snk? will be 
displayed.
6)	You can find the key in C:\GACKey\SampleKey.snk

Create an assembly:
	
1)	Open Class file in a project
2)	Include some methods like below:

public string HelloWorld()
 {
        return "Hello World";
 }
3)	Before Class, after importing namespaces, include 
the following assembly info:
using System.Reflection;
[assembly: AssemblyKeyFile("C:\\GACKey\\SampleKey.snk")]
[assembly: AssemblyVersion("1.0.0")]
4)	Build the application as Ctrl+ Shift + B
5)	Dll for the assembly will be created 
as ?App_Code.gb4sj5sd.dll? as the assembly is placed in 
App_Code
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
ASP.NET Files\exassembly\59f52ba2\a8d76ba5

To Install Assembly in GAC using GAC Util component:

1)	Open command prompt
2)	Type the following command:
3)	C:\>gacutil -
I ?C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
ASP.NET Files\exassembly\59f52ba2\a8d76ba5
\App_Code.gb4sj5sd.dll?
4)	The above after gacutil ?I is the path where 
assembly dll is created.


Register assembly entry in registry:

1. Click Start - run, then type regedit to open registry;
2. Go to
HEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Assembly
Folders\;
3. Right click AssemblyFolders, then select new to
create a new key for your assembly(for example: 
MyTestAssembly);
4. Select Modify by right clicking Default, then enter
the location where your dll resides.

Ex: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
ASP.NET Files\exassembly\59f52ba2\a8d76ba5

5. Restart the VS.NET application. (Ctrl + Shift + F5)

6. Add project reference and in .NET Tab reference list, 
you will see the assembly (App_Code.gb4sj5sd i.e.dll name) 
added to GAC. 

7. Create instance to the class in assembly and can access 
its methods.
 
Is This Answer Correct ?    0 Yes 1 No
Pandian
 

 
 
 
Other Dot Net Remoting Interview Questions
 
  Question Asked @ Answers
 
What?s a proxy of the server object in .NET Remoting?  1
What distributed process frameworks outside .NET do you know?  1
Can you have two files with the same file name in GAC?  1
What is the difference between authentication and authorization ? Digital-GlobalSoft2
In which conditions do you opt for Remoting services? Tech-Mahindra6
What is the difference between private and shared assembly?  1
What is boxing and unboxing ? TCS1
About remoting and web services. Difference between them? Microsoft3
What is unmanaged code and will CLR handle this kind of code or not ? DELL1
What is strong name and what is the need of it ? Digital-GlobalSoft1
How do you define the lease of the object?  1
What is delay signing?  1
How can you create a strong name for a .NET assembly?  2
What is a Windows process?  1
Can you configure a .NET Remoting object via XML file? Tavant-Technologies1
What are static assemblies and dynamic assemlies. Differences between them ? TCS1
What are various types of assemblies ? TCS1
Where are shared assemblies stored?  2
What are the differences between Marshal by value and Marshal by reference?  2
What is a formatter?  1
 
For more Dot Net Remoting Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com