Hi I am trying to make user control which is to be hosted in IE. The control
is inteneded to digitally sign XML with signedXml.ComputeSignature() method.
The control is strong named and in .net framework configurator I created new
group with strong name condition type and publick key imported from my .dll.
I attached Full trust to that group.

Problem is when i call signedXml.ComputeSignature() method, I get security
exception Request Failed and stack trace:
StackTrace " at
System.Reflection.RuntimeConstructorInfo.InternalI nvoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean
isBinderDefault)
at System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Security.Cryptography.CryptoConfig.CreateFr omName(String name,
Object[] args)
at System.Security.Cryptography.CryptoConfig.CreateFr omName(String name)
at System.Security.Cryptography.Xml.SignedXml.Compute Signature()
at ZET.CU3.testForm.SIgn()" String


Sub Sign is from MSDN Example.:
' Create example data to sign.

Dim document As New XmlDocument

Dim node As XmlNode = document.CreateNode(XmlNodeType.Element, "",
"MyElement", "samples")

node.InnerText = "This is some text"

document.AppendChild(node)

Console.Error.WriteLine("Data to sign:")

Console.Error.WriteLine()

Console.Error.WriteLine(document.OuterXml)

Console.Error.WriteLine()

' Create the SignedXml message.

Dim signedXml As New signedXml

Dim key As RSA = RSA.Create()

signedXml.SigningKey = key

' Create a data object to hold the data to sign.

Dim dataObject As New System.Security.Cryptography.Xml.DataObject

dataObject.Data = document.ChildNodes

dataObject.Id = "MyObjectId"

' Add the data object to the signature.

signedXml.AddObject(dataObject)

' Create a reference to be able to package everything into the

' message.

Dim reference As New reference

reference.Uri = "#MyObjectId"

' Add it to the message.

signedXml.AddReference(reference)

' Add a KeyInfo.

Dim keyInfo As New keyInfo

keyInfo.AddClause(New RSAKeyValue(key))

signedXml.KeyInfo = keyInfo

' Compute the signature.

Try

signedXml.ComputeSignature() '--------------EXECPTION IS HERE

Dim xmlSignature As XmlElement = signedXml.GetXml()

MsgBox(xmlSignature.OuterXml)

Catch ex As Exception

MsgBox(ex.GetBaseException.Message)

End Try


When the control is not identified by strong name, but i.e. URL or Site then
everything works fine.

Any ideas?


Muzzy