473,503 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error importing key - object already exists.

I'm getting the above error in a dialog box from Visual Studio 2005 when
trying to sign an assembly using a PFX file, and would like to know how to
resolve the problem.

Background:

The PFX file has been used for code-signing before (to sign an InfoPath
form), so therefore the file contains a valid code-signing key.

I have the correct password to the PFX file (because I get a different error
if I enter the wrong password - it helpfully tells me I've entered the wrong
password).

The assembly is a DLL which will be installed as an Outlook add-in, is
written in C#, and was created by using the Outlook Add-in template from
VSTO 2005. I'm signing the assembly simply by checking the "Sign The
Assembly" box, and selecting my PFX file in the drop-down list below that
box.

The Usenet news article
<http://groups.google.com/group/microsoft.public.dotnet.general/browse_thread/thread/774d0c593789658a/d4dabaeecd4c5430>
seems to discuss a similar issue, but doesn't have any good suggestions on
fixing it that I can use.

I can sign the assembly using a key that I generate, but I need to use the
code-signing certificate that has already been deployed to our existing
users.

When building the assembly with my key file selected for signing, I first
get a dialog box that reads "Import Key File", "This project includes a
password-encrypted key used for signing. Enter the password for the key
file to import the key file into the local crypto-store database for use."

Entering the password, and clicking OK, I get the dialog "Error importing
key", "Object already exists".

Often it asks me for the password several times over.

If I try to build the project, the following error is listed immediately
after the first appearance of the "Object already exists" dialog:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Micr osoft.Common.targets(1718,7):
error MSB3321: Importing key file "codesign.pfx" was canceled.

Please let me know if you have any good ideas on solving this issue.

Thanks in advance,

Alun Jones

Dec 21 '06 #1
2 6390
Alun,

How many times have you run the key generation etc, I'm sure there are
only so many spaces for private keys that can be generated. I'm sure it
was only about 16 private keys....

Have you tried doing this on a box that you didn't do the development
on?

I mean clean install, then import the PFX....

Cheers,

Graham
"sometimes no help is better than some help"
Alun Jones wrote:
Entering the password, and clicking OK, I get the dialog "Error importing
key", "Object already exists".

Often it asks me for the password several times over.

If I try to build the project, the following error is listed immediately
after the first appearance of the "Object already exists" dialog:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Micr osoft.Common.targets(1718,7):
error MSB3321: Importing key file "codesign.pfx" was canceled.

Please let me know if you have any good ideas on solving this issue.

Thanks in advance,

Alun Jones
Dec 27 '06 #2
"graham" <gr****@dunnings.netwrote in message
news:11**********************@i12g2000cwa.googlegr oups.com...
How many times have you run the key generation etc, I'm sure there are
only so many spaces for private keys that can be generated. I'm sure it
was only about 16 private keys....

Have you tried doing this on a box that you didn't do the development
on?

I mean clean install, then import the PFX....
Just tried it - clean install of Windows, clean install of VS2005, SP1,
VSTO, then open and build the project.

It asked me four times - once while opening, and three times while
building - for the pfx file's password, and while it accepted the password
without error on the first open, on the build dialogs, it gave "object
already exists".

Judging by the posters at
https://forums.microsoft.com/msdn/sh...46090&siteid=1,
this is apparently an actual, real, honest-to-goodness bug, rather than
something stupid I did (or if it's something "stupid", it needs to be
documented, because it's the kind of stupid that lots of people are going to
do).

Alun.
~~~~
Dec 28 '06 #3

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

Similar topics

7
3400
by: (Pete Cresswell) | last post by:
We were testing a version of our app that's been running for months with no problems and it started throwing "Object no longer exists" messages on two machines in the test environment. We tried...
3
4280
by: RBohannon | last post by:
I've developed a database in Access 2000 on Windows 2000. I have been asked to put the database on a machine running Windows XP. I copied the database onto the XP machine with some data already...
1
1882
by: D A H | last post by:
I have gotten the same exception in multiple projects. I have solved the underlying problem. My question is if anyone knew of a setting that would cause this exception to be thrown. A...
5
3583
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This is used for comparing a value enterd by the user against the primary key in the SQL database. IF the VALUE ENTERED BY THE...
8
7810
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
0
4318
by: tony dong | last post by:
Hi there I use vs.net 2005 with standard sql 2005 under machine\sql2005 for instant when I create webpart, the code get from quickstart as follow: <%@ Page Language="C#" %> <%@ Register...
6
4938
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not...
0
489
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX...
11
2228
by: Jim in Arizona | last post by:
I've looked around the web but can't find anything to help me out. I was able to get some code to move some files from one directory to another, which works fine: ...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
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...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.