A: 

Hey,

It's a way to specify assemblies that are "default assemblies" so you don't have to reference them. That is it's purpose; you can still use using/import statements in your code-behind and it will work fine. I would leave existing ones there as other components may rely on that.

Brian
Can also be used to define external assemblies as well.
JonH
It's not at all a listing of default assemblies. It's a listing of the assemblies that the C# or VB compiler will look at when compiling the code of your application. If you delete a reference to an assembly that is required by your application then no amount of "using" or "import" statements will work because you'll be importing namespaces that are in assemblies you are no longer referencing.
Eilon
Local assembly references dot not need to be in the list, so not all assemblies need to be there... I guess maybe that's for GAC only, but I wasn't aware it needed a reference in this list.
Brian
+1  A: 

Hello Krzysiek welcome to SO :-).

To answer your question you are probably referring to the web.config file's assembly section for your asp.net web project. The assembly section simply defines a reference / dll file that your web site may use. For instance, assume you had to write a web application that displayed a flowchart representing your workplace hierarchy.

In this case you noticed that it would be quite difficult to do such a thing from scratch. Your next best bet is to find someone who has already implemented say hierarchies in asp.net. You may find a free one but most would charge you some sort of fee. Once you get this piece of software you need to define it or reference it. That is where the assembly section allows you to define as an example a compiled dll.

Your web.config assembly section will then list it with any other relevant information. Unless you know what you are doing it may not be so wise to simply delete an existing defined assembly.

JonH
Is there any difference If I would add reference to this assembly using solution explorer "Add reference" menu ?? Can I specyfy in section assemblies only dll's instaled in GAC or any assemblies (I guest that I have to first add reference using solution eplorer, no matter if it's from GAC or not), but if I would do so what for to specify it in assemblies section ?? what it gives me ?
Krzysiek
When you add them to the reference section they will appear in the assembly section as well. Try it out!
JonH
Krzysiek - that's a great question. It's really bizarre, but in Web Application Projects in Visual Studio there are two sets of assembly references. The assemblies listed in Solution Explorer under the References node are used when compiling all the *.cs or *.vb files in your project. The assemblies listed in the web.config file that you showed in the original posting are used to compile the *.aspx files in your project.
Eilon
@Eilon that is why I mentioned the hierarchies example in asp.net. He / she (Krzysiek) could just as well throw a crystal report viewer control on the form. He / she will then notice the assembly reference in the web.config file.
JonH
@Elion and @JonH thanks for Your answers, and I am men ;)(my name in english is Cris)
Krzysiek
Krzysiek, thank you sir please accept the answer that you feel is correct.
JonH