none
The certificate, asymmetric key, or private key file does not exist or has invalid format.

    Question

  • I am sure I'm being dumb here but I am trying to deploy an assembly with external_access.

    I have signed the assembly using the <new> option in the project properties.

    When I then try and create the Key I get the above error using the code below.

    CREATE ASYMMETRIC KEY SQLExtensionUDTKey

    FROM EXECUTABLE FILE = 'C:\Documents and Settings\Simon Sabin\My Documents\Visual Studio 2005\Projects\SQLBits\Core\SQLExtensions\SQLExtensions.UDT\bin\Debug\SQLExtensions.UDT.dll'

    What could be the problem?

    Wednesday, September 20, 2006 10:02 AM

Answers

  • Not sure, I did a quick test creating a dummy dll and signed using the same method as yours and it seemed to work for me.  Which version of SQL Server 2005 are you using?

    I'm sure you already checked this, but is there any possibility that the path is mistyped or perhaps has some weird permission setting?

    Sung

     

    Wednesday, September 20, 2006 8:12 PM
  • Yep, the server will use the service account to access the file.  If your "My Docs" folder is set to just give you access, that might be why you're getting that error message?

    Sung

    Wednesday, September 20, 2006 11:18 PM

All replies

  • Not sure, I did a quick test creating a dummy dll and signed using the same method as yours and it seemed to work for me.  Which version of SQL Server 2005 are you using?

    I'm sure you already checked this, but is there any possibility that the path is mistyped or perhaps has some weird permission setting?

    Sung

     

    Wednesday, September 20, 2006 8:12 PM
  • Could be a permission thing. I have deleted the key file and resigned the assembly.

    What permissions doe the server use to access the assembly, the current user, the service account, or other ?

    Wednesday, September 20, 2006 9:25 PM
  • Yep, the server will use the service account to access the file.  If your "My Docs" folder is set to just give you access, that might be why you're getting that error message?

    Sung

    Wednesday, September 20, 2006 11:18 PM
  • I had the same problem. I gave the group Users (MYCOMPUTER\Users) permissions to access to the folder with my dll project and I was able to create the assymetric key with SQL Server 2005.

     

    Friday, August 17, 2007 8:46 PM
  •   Just a quick security note: Grating permission to all users on the system is not recommended. You can grant permissions to the Windows local group used to ACL other Windows resources to SQL Server.

     

      The group name is typically named using the following schema: “SQLServer2005MSSQLUser$machine_name$instance_name” ( Where machine_name is the name of the machine and instance_name is the SQL Server instance).

     

      Thanks a lot,

    -Raul Garcia

      SDE/T

      SQL Server Engine

     

    Saturday, August 18, 2007 7:43 AM