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

I need professional telerik winform, I need Professional TELERIK WinForm ...

I need Professional TELERIK WinForm Project Description: Professional TELERIK Professional assistance in  TELERIK WinForm via remote control. Development WinForm in C #

Write a program of console statements - c# program, Write a program of cons...

Write a program of console statements - C# Program I am unable to make out the use of console statements in C# language. Can anyone suggest me any example for this.

Explain repeater control, How can you provide an alternating color scheme i...

How can you provide an alternating color scheme in a Repeater control?  AlternatingItemTemplate Like the ItemTemplate element, but rendered for each other row (alternating item

Want a new e- payment gateway, Project Description: I want a new payment...

Project Description: I want a new payment gateway of my own. Anyone who has previous experience in preparing a new payment gateway. I mean new payment gateway not any integratio

Precautions for state server mode working, What are the precautions so that...

What are the precautions so that StateServer Mode work properly? Following are some points to remember so that StateServer Mode works properly:- a) StateServer mode session

Photohandler add-on to display file names, PhotoHandler add-on to display f...

PhotoHandler add-on to display file names Project Description: I want a website with a photo gallery using PhotoHandler. I need the code added/ modified to display the image

Online portal for hotel n holidays, Project Description: It is online po...

Project Description: It is online portal for hotel n packages sales. The project requires to be built on sql, Jquery and c#. The project should be submitted with all coding a

Need help to setup site minder agent to work with sharepoint, Site minder A...

Site minder Authentication in SharePoint We have fit site minder agent in SharePoint 2010. We would like to have incorporate with site minder agent. Currently site-minder age

Timer, what is timer control

what is timer control

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