473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Delay Signing

Hi

I'm Delay Signing an assembly. The Register for Com Interop property is set
to true for all output files.

When I build the solution I get the following error:

"COM Interop registration failed. The check of the signature failed for
assembly [Output file name]"

Can you explain what is causing this error? I am currently unable to build
any solutions that are delay signed and registered for com interop.

Regards

Trevor Hardwick


Nov 15 '05 #1
6 5389
Hi Trevor,

Registering an assembly for COM interop needs first load the assembly.
For loaing a strong named assembly , CLR will validate the strong name
before loading it.
So delay-signed assembly will failed to be loaded and then unable to do COM
Interop registeration.
To work around this problem, You may disable the strong name verification
on this assembly.
use command sn -Vr <assembly name>, Then the CLR will skip the verification
on this assembly then COM Interop registration will work.(you might need
restart the VS.NET IDE to take effect.
Note, disable the strong name verification should only be used in
development. You should remove the assembly from the skip verification list
by using sn -Vu <assembly name> after you signed this assembly.

Does my reply solve your problem?
Please be free to reply this thread, if you still have problem on it.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.

Nov 15 '05 #2
Hi

Thanks for replying. Does this mean that if I wanted to Delay Sign an
assembly that is registered for com interop I would have to:

1) Build the assembly with Register For Com Interop set to false
2) Use the sn.ex to disable the strong name verification for the assembly
3) Build the assembly with Register For Com Interop set to true
4) Use the sn.exe to reapply the strong name verification

Surely this is very long winded and isn't very practical for commercial
applications that have many development cycles and release cycles. Although
a script could be put together you are effectively building the assemblies
at least twice and it means that all developers must follow the above steps
when ever they make any changes to the source code and have to rebuild an
assembly, rather that just clicking the rebuild solution menu option in the
VS.NET IDE . Is this really how microsoft planned this to work?

Regards

Trevor
""Ying-Shen Yu[MSFT]"" <v-***@online.microsoft.com> wrote in message
news:wt**************@cpmsftngxa07.phx.gbl...
Hi Trevor,

Registering an assembly for COM interop needs first load the assembly.
For loaing a strong named assembly , CLR will validate the strong name
before loading it.
So delay-signed assembly will failed to be loaded and then unable to do COM Interop registeration.
To work around this problem, You may disable the strong name verification
on this assembly.
use command sn -Vr <assembly name>, Then the CLR will skip the verification on this assembly then COM Interop registration will work.(you might need
restart the VS.NET IDE to take effect.
Note, disable the strong name verification should only be used in
development. You should remove the assembly from the skip verification list by using sn -Vu <assembly name> after you signed this assembly.

Does my reply solve your problem?
Please be free to reply this thread, if you still have problem on it.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before sending.

Nov 15 '05 #3
Hi Trevor,

Thanks for your reply.

When developing a delay-signed assembly, we need first add it to the skip
verification list before using this assembly. However, we needn't first
generated the assembly specially for adding to the strongname skip
verification list. Sn.exe support the input form "*, strongname" to add
all assemblies which signed with a certain public key to the list. Here
strongname should be specified as the string of hexadecimal digits
representing the tokenized form of the public key. See the -t and -T
options to display the public key token.

So the development steps might be:
1) sn -Vr *,<strongname>, if you have more than one public keys, you need
repeat this step to add them.
2) write your delay signed assembly with "Register for COM Interop" = true
3) debuging, if code change goto 2)
4) sign the assembly for release
5) sn -Vd *,<strongname>
6) release

In development cycle, you need keep this assembly in the skip verification
list, or you program might meet problem because of the assembly load
failure caused by the strongname validation failed. Since it is still in
the skip list, developers will still be able use the rebuild solution menu
option to do build operation. You may remove the assembly from the list
after it is fully signed.

Here is just some basic idea for this issue, if you still have problem on
it, please let me know more detail about your secenario. I'll look into it
and see if I could find some workaround.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.

Nov 15 '05 #4
Hi

Thanks for your help. The information you have given me is fine. Due to
the complications of delay signing I think I will try a different approach.

Cheers

Trev

""Ying-Shen Yu[MSFT]"" <v-***@online.microsoft.com> wrote in message
news:yH**************@cpmsftngxa07.phx.gbl...
Hi Trevor,

Thanks for your reply.

When developing a delay-signed assembly, we need first add it to the skip
verification list before using this assembly. However, we needn't first
generated the assembly specially for adding to the strongname skip
verification list. Sn.exe support the input form "*, strongname" to add
all assemblies which signed with a certain public key to the list. Here
strongname should be specified as the string of hexadecimal digits
representing the tokenized form of the public key. See the -t and -T
options to display the public key token.

So the development steps might be:
1) sn -Vr *,<strongname>, if you have more than one public keys, you need
repeat this step to add them.
2) write your delay signed assembly with "Register for COM Interop" = true
3) debuging, if code change goto 2)
4) sign the assembly for release
5) sn -Vd *,<strongname>
6) release

In development cycle, you need keep this assembly in the skip verification
list, or you program might meet problem because of the assembly load
failure caused by the strongname validation failed. Since it is still in
the skip list, developers will still be able use the rebuild solution menu option to do build operation. You may remove the assembly from the list
after it is fully signed.

Here is just some basic idea for this issue, if you still have problem on
it, please let me know more detail about your secenario. I'll look into it
and see if I could find some workaround.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before sending.

Nov 15 '05 #5
Sorry, There is a typo.
5) sn -Vd *,<strongname>
should be
5) sn -Vu *,<strongname>
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.

Nov 15 '05 #6
Hi Trevor,

I fully understand you feeling,
However, in order to be make the system safer, currently .NET framework
requires you change the skip verification list manually, then you will have
a clear mind on which assemblies' strong name is not checked by CLR. You
need only add to the skip verification list for one time before you start
developing the delay signed assemblies, I'm not clear what the
"complication" you referrs to? Of course, it will be easier if you develop
this assembly without strong name at first and
fully sign it when you are going to relase it.

If you have any ideas on how to integrating delay-sign with other IDE
features, please be free to let us know, thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Graham Allwood | last post by:
Hi, I have an assemly that is delay signed during the dev work and then it is resigned later when we perform a release build. In the same solution I have a setup project that uses the PRIMARY...
1
by: Martin | last post by:
I have a couple of questions around code signing with MS technology: 1. Is there a way to transfer the generated strong name signing private key directly to a smartcard (or generate it on the...
4
by: Todd Richardson | last post by:
Two questions. We would like to have users complete ASP.NET web forms for submission. Once these are completed I would like to generate an XML document from the form. The XML document should...
0
by: cl | last post by:
I am using the "VeriSign Class 3 Code Signing" certificate for signing my Access program in Office 2003. Up to now, when program was installed on client machine, a form was appearing and user...
1
by: AVL | last post by:
Hi I need some clarification on signing. what does it mean--signing an assembly? where is ti used? How is it used?
0
by: inpuarg | last post by:
I have more then 5 projects in one solution. (c# VS 2005) GUI , BOL , DAL , Common Library , Extended Grid Component etc. All are compiled as strongly named assemblies. I am using public...
0
by: Raffi Basmajian | last post by:
I am trying to understand the difference between signing ClickOnce manifests and signing shared assemblies. My company is building .Net 2005 WinForm applications for internal company use only....
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
1
by: BillE | last post by:
<extreme frustration> I have googled and read about this, but can't seem to get a grip on it. Apparently I am being coerced into digitally signing applications. Is this true? What if I don't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.