Ask a Question related to ASP.NET Security, Design and Development.
-
Muzzy Co #1
IE hosted strong named control
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
Muzzy Co Guest
-
variable named field calculated from variable named fields
I have two form fields per line defined in a cfloop thusly: <cfloop index="i" from= "1" to= "100" Step="1"> <cfif isdefined("form.item_number_"... -
Parser Error: Type XYZ does not have a property named 'cc3:MyItems' (complete posting) ASP.NET Web Control Error
I am having problems trying to get this part of the functionality working on my control and I hope somebody has a clue about how to resolve it. ... -
Error Creating Control: Parser Error DocHeader does not have a property named 'cc3:MyItems'
I am having problems getting this webcontrol working properly. Everything else works fine except having items. So here is the low-down on the... -
Sharing ASPAUTH cookie between IE and a hosted Windows Form Control
Hello everyone, I have a situation where I am hosting a windows forms based control on a web page in IE. Because the windows forms app uses web... -
Dynamically referring to a named control
Hi, I have a calendar form which is displayed whenever a user selects the caledar button next to a number of different date fields on a seperate...



Reply With Quote

