hi, i am newbie in asp.net. i want to ask something about configuration in web.config. this is my code :
???????
What's for assembly, version, culture, publickey token? what's happened if i dont use it? and how to determine the value of : assembly, version, culture, publickey token?
i'm sorry before. but i hope you understand all my question. because my english is not really good... :D
SenthilkumarPosted Apr 9, 2012, 11:57 PM
ASP.Net allows you to create the multiple assemblies with the same name. The shared assembly resides in the GAC folder, it allows the multiple application can share the same assembly.
As i said, you can have many assembly with the same name. The version has to be applied to the assembly it identifies by the encrypted key.
When your application want to use the correct assembly then you need to specify the version and other details in the web config.
I suggest you to go through these url for better understanding of shared assembly, strong name key creation, register into GAC and other details.
http://weblogs.asp.net/chrismoseley/archive/2008/10/28/shared-assemblies-without-the-gac.aspx
http://support.microsoft.com/kb/815808
http://www.developerscode.com/2011/03/how-to-create-shared-assemblies-in.html
Jignesh TrivediPosted Apr 9, 2012, 11:41 PM
All versioning of assemblies that use the cLR (comman launguage Runtime) is done at the assembly level.
The specific version of an assembly and the versions of dependent assemblies are recorded in the assembly's manifest.
The default version policy for the runtime is that applications run only with the versions they were built and tested with, unless overridden by explicit version policy in configuration files
public key token, which is the last 8 bytes of the SHA-1 hash of the public key under which the application or assembly is signed.
you must pass public key token and version information when you register it in config file.
you can get your public key token using following command from visual studio command prompt.
sn –T myDLL.dll
sn means storng name and this exe located in frame work folder <%windir%>/Microsoft.NET\Framework\{framework folder}
please refer,
http://blogs.msdn.com/b/wriju/archive/2008/07/01/how-to-find-public-key-token-for-a-net-dll-or-assembly.aspx
hope this help.
MuthuMari MPosted Apr 9, 2012, 12:03 PM
Assembly is nothing but, unit of deployment like EXE or a DLL.Assembly consists of one or more files (dlls,.exe's, html files etc), and represents a group of resources , type definitions, and implementations of those types.
An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing.
There are two types of assembly – private and public assembly.
A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath.
A shared assembly is normally stored in the assembly cache, which is a repository of assemblies maintained by the .NET runtime. Shared assemblies are usually library of code, which many applications will find useful, e.g crystal report classes that will be used by all the application for reports.
Updating the application configuration file with the latest version and the correct public key token is important for a .Net application to execute successfully. One can look up the public key token of a .Net assembly in one of the following ways.
pls refer this url
http://cavemansblog.wordpress.com/2011/02/03/how-to-get-public-key-token-of-a-net-assembly/
http://www.akadia.com/services/dotnet_assemblies.html
thanks.
If this post is useful then mark it as "Accepted Answer"