BKJIA exclusive translation] explore some best practices in ASP. NET application development and perform these useful procedures to improve your application performance. This article shows eight best practices that you can follow when developing ASP. NET Applications in production mode.
1. Use version control to control your Assembly
Make sure that you have a set of appropriate version control policies. during compilation, you can use the assembly version attribute to apply the version flag, for example:
[Assembly: assembly version ("1.0.12.34")]
During the build process, the version number of an application is usually the same.
2. Give the Assembly a strong name
An assembly is the minimum unit for version control and code reuse, including:
◆ Assembly ID information name, version, etc)
◆ List and metadata
◆ MSIL code
◆ Type and Security Information
◆ Resources
An assembly with a strong name can uniquely identify it together with its version information, region information, and digital signature.
The Secret tool creates a strong-name key file from the command line, such:
Sn -- k MyCompany. snk
When you execute the preceding command, you will see the content output shown in 1.
BKJIA exclusive translation] explore some best practices in ASP. NET application development and perform these useful procedures to improve your application performance. This article shows eight best practices that you can follow when developing ASP. NET Applications in production mode.
1. Use version control to control your Assembly
Make sure that you have a set of appropriate version control policies. during compilation, you can use the assembly version attribute to apply the version flag, for example:
[Assembly: assembly version ("1.0.12.34")]
During the build process, the version number of an application is usually the same.
2. Give the Assembly a strong name
An assembly is the minimum unit for version control and code reuse, including:
◆ Assembly ID information name, version, etc)
◆ List and metadata
◆ MSIL code
◆ Type and Security Information
◆ Resources
An assembly with a strong name can uniquely identify it together with its version information, region information, and digital signature.
The Secret tool creates a strong-name key file from the command line, such:
Sn -- k MyCompany. snk
When you execute the preceding command, you will see the content output shown in 1.
Figure 1. Create a strong-name key file
When you create a project in Visual Studio, you will see a project called AssemblyInfo. cs default file, you can use it to specify the relevant attributes, which is listed below in AssemblyInfo. strong name information that can be specified in the cs file.
[Assembly: AssemblyCulture ("")] assembly: assembly Region ("")]
[Assembly: AssemblyVersion ("1.0.0.0")] assembly: assembly version ("1.0.0.0 ")]
[Assembly: AssemblyKeyFile ("MyCompany. snk")] assembly: assembly key file ("MyCompany. snk "]
3. disrupt your Assembly
Before you start to deploy an assembly, it is best to disrupt it, which makes it more difficult to decompile and prevents reverse engineering attempts. Therefore, protect your source code against potential threats. In addition, if an assembly is disrupted, the size of the Assembly can be reduced to improve the application performance.