From: Richard Kirk on
Hi there,

Am trying to get a signed CLR to call an external webservice in SQL2005.
Can get this to work using UNSAFE, but am attempting to follow MS guidelines
and produce a SAFE version using a signed version of the CLR.

Have signed the assembly in VS2005 which has given me a .pfx file.

Am running SGEN to get my XML Serialization and am getting the error "Bad
Version of provider" (see below):

"c:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\sgen"
/a:SqlServerCLR.dll /force
/compiler:/keyfile:"C:\SqlServerCLR\SqlServerCLR.pfx"
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Unable to generate a temporary class (result=1).
error CS1548: Cryptographic failure while signing assembly
'c:\SqlServerCLR\bin\Debug\Senior.SqlServerCLR.XmlSerializers.dll' --
'Bad Version of provider. '

Am I missing a step and/or using the correct file when using the .pfx?

Thanks.