What is delay signing, DOT NET Programming

Assignment Help:

Delay signing

During the development process you  need strong keys name  to be exposed to the developer which is not a good practice from security aspect .In such situations you can assign the key later on and during development you use delay signing.

Following is the process to delay sign an assembly:

(1) First obtain string name keys using SN.EXE.

(2) Annotate the source code for  assembly with 2 custom attributes of System.Reflection: AssemblyKeyFileAttribute, that passes the name of the file having  public key as a parameter to its constructor. AssemblyDelaySignAttribute, which indicates that the delay signing, is being used by passing true as the  parameter to its constructor.

 

[C#]

           [assembly:AssemblyKeyFileAttribute("myKey.snk")]
           [assembly:AssemblyDelaySignAttribute(true)]

The compiler inserts the public key into assembly manifest and reserves space it in the PE file for the full strong name signature. The real public key should be stored while the assembly is built so that the other assemblies that reference this assembly can also obtain the key to store in their own assembly reference.

(3) Since the assembly does not have a valid strong name signature, the verification of that signature should  be turned off. You can do this by using -Vr option with the Strong Name tool.The example following  turns off verification for an assembly called myAssembly.dll.

Sn -Vr myAssembly.dll

(4) Just before shipping, you must submit the assembly to your organization's signing authority for the actual strong name signing using the -R option with the Strong Name tool. The following example signs an assembly known as myAssembly.dll with a strong name using sgKey.snk key pair.

Sn -R myAssembly.dll sgKey.snk


Related Discussions:- What is delay signing

Image viewing in datagrid view, im retrieving the path of image from the da...

im retrieving the path of image from the database i want to get the image in that path to be displayed in my datagridviewvolumn

Different types of joins, What are the different types of joins? 1) IN...

What are the different types of joins? 1) INNER JOIN: The Inner join shows matches only when they exist in both the tables.For example, in the SQL below there are two tabl

Website programming , Question 1 A small Canadian law firm specializin...

Question 1 A small Canadian law firm specializing in immigration law has what it considers a successful website. One of the most popular features of the website is its newslet

Professional telerik winform, Professional TELERIK Bind MS ACCESS Req...

Professional TELERIK Bind MS ACCESS Required: 1. Including custom fields to the Schedule. 2. Schedule Calendar Sync with Outlook 3. Selecting display in Schedule res

State the differences between the dispose and finalize, State the differenc...

State the differences between the Dispose () and Finalize(). CLR uses the Dispose and Finalize methods to perform garbage collection of run-time objects of .NET applications.

How to avoid deadlock in threading?, Avoid deadlock in threading The be...

Avoid deadlock in threading The best  and careful planning may avoid deadlocks.There are so many ways Microsoft has provided by which you can decrease deadlocks for example Int

Explain hybrid and community cloud, Explain hybrid and community cloud. ...

Explain hybrid and community cloud. The hybrid cloud having of multiple service providers. This model integrates several cloud services for Hybrid Web hosting. It is basically

What is the scope of public and private class, What is the Scope of public/...

What is the Scope of public/private/friend/protected/protected friend? Scope of public/private/friend/protected/protected friend Visual Basic/Visual C# Public/public all

Explain keywords with example, Explain keywords with example. Keywords...

Explain keywords with example. Keywords are those words that are reserved to be used for an exact task. These words cannot be used as identifiers. You cannot use a keyword to

Web application as well as site design & development .net, Web application ...

Web application as well as site design & development (.NET) We are interested in retentive the services of a solution provider that will design and implement the presentation la

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd