

The resulting assembly is accessible to any other code in the Web application. You can store source code in the App_Code folder, and it will be automatically compiled at run time.
#Appcode folder in asp.net full#
For example, the code might be running with full trust. If you are working in a designer such as Visual Studio, code in the Bin folder runs in a different context than at run time. For more information, see ASP.NET Trust Levels and Policy Files. Therefore, they cannot access resources or invoke code outside the current Web application.Īt run time, the access levels of an assembly are established by the trust level specified on the local computer. Note these security aspects of putting compiled code into the Bin folder:Īssemblies in Bin folder are scoped to the current application. Be wary of compiled code until you have tested it and are confident that you understand what it does. However, you should treat compiled code in the Bin folder as you would treat any executable code.

If you wrote the code yourself and compiled it, then you know what the code does. Putting compiled assemblies into the Bin folder can represent a security risk. For information about why you should not do this in ASP.NET 1.0 or ASP.NET 1.1, see the KnowledgeBase article "Access Denied" Error Messages on the Microsoft support Web site. In ASP.NET 2.0 and later versions, you can put strong-named (signed) assemblies in the Bin folder.
#Appcode folder in asp.net .dll#
dll and write a new version of it to the Bin folder, ASP.NET detects the update and uses the new version of the. dll file in the Bin folder is sufficient for ASP.NET to recognize it. You can copy the compiled assembly to the Bin folder of your Web application and the class is then available to all pages.Īssemblies in the Bin folder do not need to be registered. A typical example is that you have the compiled code for a custom class. You can store compiled assemblies in the Bin folder, and other code anywhere in the Web application (such as code for pages) automatically references it. For information about how these folders work in Web application projects, see App_Code folder doesn't work with Web Application Projects on Vishal Joshi's blog. When you create these folders and store particular types of files in them, ASP.NET handles the files in special ways. If your Web site application includes code that you want to share between pages, you can keep the code in one of two special folders underneath the root of your Web application, the Bin folder and the App_Code folder.
