Effect of clips in ASP. NET Solutions)

Source: Internet
Author: User
1. Bin folder
Bin folder contains applications Program Required for controls, components, or any other Code Deployment assembly. Any. DLL files in this directory are automatically linked to the application.

2. app_browser folder
This optional folder contains the. Browser file .. The Browser file describes the features and functions of the browser, whether it is a mobile browser or a desktop browser.

3. app_code folder
The app_code folder is located in the root directory of the Web application. It stores all class files that should be dynamically compiled as part of the application. These class files are automatically linked to the application without adding any explicit commands or declarations on the page to create dependencies. The class files placed in the app_code folder can contain any identifiable ASP. NET component-custom controls, helper classes, build providers, business classes, custom providers, and HTTP processing programs.
Note that during development, changes to the app_code folder will cause the entire application to be re-compiled. This may be undesirable and time-consuming for large projects. To this end, we encourage you to modularize the code into different class libraries and organize the code according to the logically related class sets. Most of the helper classes dedicated to applications should be placed in the app_code folder.
All class files stored in the app_code folder should use the same language. If a class file is written in two or more languages, you must create subdirectories in a specific language to contain classes written in each language. Once these class files are organized by language, you must add a setting for each subdirectory in the web. config file:
<Compilation>
<Codesubdirectories>
<Add directoryname = "vbfolder"/>
</Codesubdirectories>
</Compilation>
It is important that subdirectories in specific languages should be registered in the web. config file. Otherwise, all files in the app_code folder will be compiled into a separate assembly no matter which folder they belong. The preceding configuration script describes the situation where all C # files are stored in the root directory of the app_code folder, and several Visual Basic. Net files are moved to the vbfolder directory. If the directory mentioned in the <codesubdirectories> section does not exist, a compilation error is reported.
Files in the app_code root folder are compiled into the app_code_xxx.dll assembly, where XXX is a random character sequence. The file in a given subdirectory will be compiled into a dynamically created Assembly named app_subcode_xxx_yyy.dll. xxx indicates the subdirectory name, And YYY indicates a random character sequence. The <codesubdirectories> section is valid only when the web. config file in the application root directory is set.
Place an assemblyinfo. CS file in the app_code directory or any other sub-directories to create a strongly-named assembly. Obviously, if the folder contains a Visual Basic. Net file
Assemblyinfo. VB file. The assembly configuration file can reference A. SNK file to save the key with a strong name.
Note: To set a strong name for an assembly, you must first obtain a public/private key pair. You can obtain such a key pair by using the strong name (strong name1_tool (sn.exe. The strong name tool is one of the SDK binary files that we can find in the. NET Framework installation path. A key pair file usually has a. SNK extension. You can save the file to an application folder and reference it in the assemblyinfo. CS file, as shown below:
[Assembly: assemblykeyfileattribute (@ "yourkeypair. SNK")]
Note that Visual Basic. NET is used to find the key file in the directory containing Visual Studio solution, while the C # compiler searches for the key file in the directory containing the binary file. Therefore, we can use this attribute to adjust the path we are using or place the key file in a suitable folder.
In any subsequent re-generation, the Assembly name will change. At the same time, when the old appdomain request ends, the old assembly will be deleted.
The app_code Folder does not only contain class files. In particular, it can contain and can automatically process XSD files representing the data architecture. When you add an XSD file to this folder, the compiler parses it into a dataset class with a type and adds it to the application scope. In ASP. NET 1. X, this job is directed by Visual Studio .netand completed by a command line program (xsd.exe.
Note: When registering a component (for example, a custom server control or a custom HTTP handler) using the web. config file, you must specify the Assembly name that contains the code. If this component is defined
In the app_code folder, what name should be used to indicate the assembly? In this case, you only need to ignore the assembly information and specify the complete class name. If no collation set is specified, the ASP. NET runtime attempts to load the class from any mounted assembly, including the Assembly dynamically created for the app_code folder.

4. app_data folder
The app_data folder should contain the local data storage of the application. It usually contains data storage in the form of files (such as Microsoft Access or Microsoft SQL Server express database, XML files, text files, and any other files supported by the application. The content of this folder cannot be processed by ASP. NET. This folder is the default location for ASP. NET providers to store their own data.

Note: by default, ASP. NET accounts are granted full access to folders. If you happen to want to change
ASP. NET account. Make sure that the new account is granted read/write access to the folder.

5. app_globalresources folder

6. app_localresources folder

7. app_themes folder
the app_themes folder defines the topic for the ASP. NET control. The topic contains a folder in the app_themes folder. According to the definition, a topic is a group of files with style information. The file content in the theme folder is compiled to generate a class, which is called by the page to set the theme control style programmatically.
the app_themes folder lists the local topics of the application. The application can also inherit the global themes defined in the following folders:
% WINDOWS % "Microsoft. net "Framework" [version] "ASP. netclientfiles "Themes
from the compilation perspective, there is no difference between a global topic and a local topic. If a topic with a given name exists both the local topic of the application and the global topic of the server machine, the local topic is preferred.

8. app_webreferences folder
in Visual Studio. NET 2003, an ASP.. the WSDL file. Web Service descriptionlanguage (WSDL) is not enough for using web services from pages. The ASP. NET page is eventually a Managed class and needs to communicate with another Managed class. Therefore, a Web Service is encapsulated by a proxy class. This proxy class is created by Visual Studio using the command line tool wsdl.exe. This proxy class should include as many methods as possible as the web method of the web service provider, and it combines any custom data type defined by the public interface of the web service.
developers do not have to pay a lot for this operation. However, developers obviously need to rely on Visual Studio to generate proxy classes. Isn't it easier and easier to directly place the. WSDL file somewhere in the application's directory tree and let ASP. NET handle other tasks? This is exactly what the app_webreferences folder is going to do.
it identifies those used to describe the bound web service. the WSDL file and generate the runtime proxy class for ASP.. NET page can be placed in a type-safe way to call Web Services. The app_webreferences folder can contain subfolders. The name of the sub-Folder drives the namespace of the proxy class obtained at the end, while the WSDL file defines the class name. For example, the samples. WSDL file and the prosaspnet20 sub-folder will create a proxy class called proaspnet#samples. The Assembly created in this dynamic state is called app_webreferences.xxx.dll, where XXX is a random character sequence.

folder name

file type

Notes

Bin

. Dll

Contains any pre-generated assembly required by the application

App_browsers

. Browser

Contains the browser definition file specific to the application. ASP. NET uses it to identify various browsers and determine their functions

app_code

. CS ,. VB ,. XSD and custom file types

contains the source files of classes compiled as part of the application. When the page is requested, ASP. NET compiles the code in this folder. The code in this folder is automatically referenced in the application

app_data

. MDB , . MDF , . XML

include Microsoft
office access and SQL express files, XML files, or other data storage

App_globalresources

. Resx

Resource files included in the localized application for programming

App_localresources

. Resx

Resource files containing page ranges

App_themes

. Skin. CSS,. XSL, and ancillary files

Contains a set of files that define the appearance of ASP. NET pages and controls

App_webreferences

. WSDL

Http://www.sifung.com/pages/1175.shtm:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.