SignedXML.CheckSignature() not working

I'm using Michael Gallants DecodeCertKey example to get the public key
from an X509 certificate. I then create an RSAServiceProvider and try
to use it to CheckSignature() on the signed XML file. Other sources
such as can
verify the signature, but .Net won't. Any ideas?

Here is the code I'm using:

    ' Verify the signature of an XML file and return the result.
    Public Shared Function VerifyXmlFile(ByVal Name As String) As

        ' Create a new XML document.
        Dim xmlDocument As New XmlDocument

        ' Format using white spaces.
        xmlDocument.PreserveWhitespace = True

        ' Load the passed XML file into the document. 

        Dim oRSA As RSACryptoServiceProvider
        ' Load the X509 certificate.
        Dim x509Cert As X509Certificate =

        '//Create a new instance of RSACryptoServiceProvider.
         oRSA = DecodeCertKey.DecodeObject(x509Cert.GetPublicKey())

        ' Create a new SignedXml object and pass it
        ' the XML document class.
        Dim signedXml As New SignedXml

        ' Find the "Signature" node and create a new
        ' XmlNodeList object.
        Dim nodeList As XmlNodeList =

        ' Load the signature node.
        signedXml.LoadXml(CType(nodeList(0), XmlElement))

        ' Check the signature and return the result.
        Return signedXml.CheckSignature(oRSA)

    End Function
chris-a (1)
7/4/2004 5:05:17 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 57


Similar Artilces:

Some poor slob installed Ubuntu. Needs to run line commands to get that piece of crap to work
I installed ubuntu 9.10 and it was rebooting just before the login screen. After really long search it turned out it's the video driver, I guess the one coming with ubuntu didn't like my card. I have integrated Radeon HD3200. What worked for me: 1. Select recovery mode from grub menu (in your case for 9.10 too) 2. In the first following screen select "root with networking" to have internet 3. Install video driver package EnvyNG with: sudo apt-get install envyng-core envyng-qt <==================== line commands to get sucky Ubuntu to work. Oops. 4. Run i...

work 04-30-07
Michael Johnson On August 1, 1996, Michael Johnson electrified the world by winning an Olympic gold medal in the 200-meter dash with a time of 19.32, shattering his own world record and capping one of the greatest individual track and field performances in Olympic history. Johnson became the first person in history to win both the 200 meters and 400 meters in the same Olympic Games. These performances in front of an American audience highlight a decorated career for Johnson, who will be competing in his third Goodwill Games in 1998. Some of Johnsons accomplishments include: � W...

Excel at Work
How do you make it to where you can insert data onto one of the worksheets and if you copy and paste to another and then go back and update it on the original and it automatically changes it on the other worksheets "Confuzzled" <> wrote in message > How do you make it to where you can insert data onto one of the worksheets > and if you copy and paste to another and then go back and update it on the > original and it automatically changes it on the other worksheets It...

CTRL+PAGE UP/DOWN isn't working. Any advice?
Any advice? CTRL+PAGE UP and CTRL+PAGE DOWN don�t move me from on worksheet to another on my computer. I�ve searched the forums for solutions already given for this problem and haven�t found solution that works on my machine yet. I�ve tried using: -Tools, Options, Transition(tab), turn off Transition shortcut keys: M transition shortcut keys are turned off. -Scroll Lock is off. I�m using: -Excel 2002 for Office XP -WindowsXP Professional platform -Dell Inspiron 8100 (which is about 2.5 years old) I welcome all suggestions. Thanks -- Message posted from http://www.ExcelForu...

Microsoft Works Suite 2006
I recently purchased a new copy of Works Suite 2006, (I know it's new because I broke the plastic wrapper. It has the license on the back of the case.) I had to wipe my hard drive and re-install Windows XP Pro. for an un-related problem. All my other programs re-loaded fine. Works Suite 2006 refuses to do anything except make the green light on my cd unit glow. The person I bought it from says it sounds like I'm missing some drivers or software. I tried to correct this with a re-install but it didn't help. Anybody have any ideas what's wrong? Thanks johnalangmi wrong g...

Excel filter not working
I have a large spreedshett(800 lines) I clikced on DATA>FILTER>AUTO FILTER and the arrows shopwed up on the various col. One of these Col is called DATE I click in the DATE arrow and select BLANK to find all the entries that do not have a date showing. This works well until about line 701 The line numbers to the left all turn blue and all is well BUT in the following lines that the col displays dates and the numbers on the left have not changed color I thought that once the filter was set to BLANK only the lines that are blank under DATE would appears. This is not the case Can any one h...

Delete grayed but has pull down that works
My 2007 Access running a 2003 database with form/subform/2ndsubform has 'Delete' grayed out on the menu bar but the pull down works to select 'Delete Record'. I remember that it is available but others do not use Access as much and it not being seen as available they call on me to delete records as administrator. Anyone know why it is this way? -- Build a little, test a little. ...

HidD_GetFeature() working, HidD_SetFeature() not working
Hi all, Afetr a lot of tries I finally found and hid descriptor that work as keyboard hid minidriver and, in my intention, should allow me to communicate with the driver thought the two api calls HidD_SetFeature() and HidD_GetFeature(). Unfortunately it seem thta only HidD_GetFeature() is working. If I try to use HidD_SetFeature() I note that the driver receive the HID_SET_FEATURE event but the buffer passed to the event that should contain my custom data to set is always 2 bytes length, not the original size I passed using the HidD_SetFeature() call (in my test example I passed a ...

Find Feature in Outlook not working in Exchange environment
I installed a Windows Server 2003 Small Business Edition Server in my client's office. I went to each computer and added the Exchange account and migrated all of their existing data into their Exchange folders. After doing this, the Find button will not work. Even if I choose Find in All Mail Folders and put a word like "a" to look for, it will not come up with anything. Does anyone have any ideas or answers? Your help is greatly appreciated. Regards, William Ford is find looking in the exchange mailbox or the original pst? -- Diane Poremsky [MVP - Outlook] Autho...

Hyperlinks to Oulook 2007 not working
Hi, I wondered if anyone may be able to help on the following issue (driving me crazy!) I create a hyperlink to a Outlook Public Folder (by dragging the folder onto a Word document). When I click on this hyperlink ,I firstly get a message "Microsoft has identified a potential security concern. The location may be unsafe. Do you wish to continue?" I say 'Yes' and then an Internet Explorer page is displayed with a "Cannot display this webpage" message. This behaviour only happens in Office 2007 - when I log on to another PC that has Office 2003 installed, I can cl...

Hyperlink not working
I'm working with Excel 2002 and what to make a hyperlink into anothe xls file using the hyperlink function, I use this string: ("[C:\Documents and Settings\Al Users\Documents\november.xls]daily",("daily file")) where november.xls is the file I want to open and daily is the specifi worsheet, daily file is what apears on the hyperlink, when I hit th Hyperlin it does open the november file but does not take me to th daily worksheet and opens a "Reference is not valid" sign, I have mak sure that the daily Ws exists and have tried with other WS in the sam file w...

MS Duet work with MS Project
I understand the collaboration of SharePoint and SAP “Duet” will be integrated with 2010 office suite. Does this include MS Project? Will Duet work with MS Project? I doubt that Reuter, but you may want to have a look at a product from TPG. (The Project Group). they specilise in the integration between Project Server and SAP Hope this helps -- Marc Soester [MVP] "Reuter" wrote: > I understand the collaboration of SharePoint and SAP “Duet” will be > integrated with 2010 office suite. Does this include MS Project? Will Duet >...

SEND BUTTON does not work
I have defined the parameters of the SEND button to send information to my e-mail. The e-mail address is correct and my Host services support Frontpage 2003 and up. It seems as though I have defined everything correctly but I still get an error "Internet Explorer cannot display the web page". I checked everything that was suggested and it seems that everything is OK, but the problem still persists. Is there anyone who has come across this problem? It may support FrontPage but since this is a Publisher group, I have to assume you are using Publisher to create your page. Have yo...

Mail Rules do no work
Hi, I imported rules from OE to OL. When I receive mail the rules can not be applied, but when I do it manually it worked. Also nex to the rule I have a hammer an wrench icon... Do not know what that means. Thanks again. AJS AJS, you wrote on Thu, 26 Mar 2009 15:30:06 -0700: > When I receive mail the rules can not be applied, but when I do it > manually it worked. See if following article helps: X'Posted to: microsoft.public.outlook,microsoft.public.outlook.general -- Best Regards Christian Goeller MVP - MS Outlook http://www.outlo...

Weird: Code works in MDB but not in MDE
I have an MDB that works flawlessly but when I create an MDE from it gives the following error: "The expression After Update you entered as the event property setting produced the following error: You can't assign a value to this object. This is 'after update' event of combo box. Any clues??? I was getting this in the MDB but commented the offending statements out the recompiled. How do I debug an MDE? Was the MDB compiled before creating the MDE? Was the MDE created using the same version of Access that the MDB was created in? Regards Jeff Boyce Microsoft Office/Ac...

Audio does not work on other end of video call
I have 3 or 4 people that I have tried to setup video calls thru messenger and only one of them can hear me clearly. One can hear me but I have to yell. Another cannot hardly hear me at all and is choppy. The video portion works fantastic on both ends, as well I can hear everyone crystal clear. I also know that the other party's systems seem to be working well because I can actually hear their pc's making noise when I type a message or when they play something. So I don't think they have speaker issues. Does anyone know what the problem could be? Everyone i...

Transfering Database From Excel to Works
New at this, Would appreciate any help. How do I transfer data from Microsoft Excel Database to Microsoft Works Database? Thanks ...

Averageif is not working
why is the formula below not working...It returns the #VALUE! =AVERAGEIF((C5:C12,C15:C18,C21:C30,C33),"<>0") Thanks Curtis wrote: > why is the formula below not working...It returns the #VALUE! > > =AVERAGEIF((C5:C12,C15:C18,C21:C30,C33),"<>0") > > Thanks #VALUE! error Occurs when the wrong type of argument or operand is used. Possible causes and solutions: 1. Entering text when the formula requires a number or a logical value, such as TRUE or FALSE. Microsoft Excel cannot translate the text into the correct da...

Send/Receive will not work.
All settings for my POP3 account on my newly installed MS outlook 2007 look correct. (Test email works - but only visible through webmail). On attempting a Send/Receive All, I receive a message "The operation failed. An Object could not be found" immediately. My Send/Receive progress bar shows nothing. Any ideas on what's wrong would be appreciated. Thanks. Do you have a virus scanner installed which integrates itself with Outlook? Uninstall this integration part of your virus scanner and try again; you'd still be sufficiently protected by your on-acce...

Smarlist Export Not Working
I've got a single workstation that won't export from Smartlist to Excel or Word. When I click the Export button I get the message, "An error occurred during the export process. All export tasks were not completed." Happens logged in as Administrator (workstation) and sa (GP) as well, no other workstations are having this issue. This user works fine on another workstation. I've reinstalled Office then GP and I'm still getting the error. There's a post from back in 2007 where someone else was having the same issue but there were no answers. Phil, To ans...

FindFirst not working in 2007
I am having a problem with a very simple FindFirst command not working. I thought it was me but I opened an old database and it will not work there either (that one is in 2002). I do get one to work when I call it from the switchboard option but when opening in design and running it there, it doesn't work. Any ideas? I just got 2007 so there may be a control or something that I am not aware of. Becky, you may need to tell Access 2007 that your database is in a trusted folder. Otherwise not code will run. To do this, go to: Office Button | Access Options | Trust Center | Tru...

Why this code does not work?
Why this code does not work? [Report] is a checkbox located in a Subform named:lbl_ScrapDB_subform and [shift_combo] is a combobox located in Form named:WScrapForm could you please help =============================================== Private Sub Report_Click() If IsNull(Form!WScrapForm![shift_combo]) Then MsgBox "You must Select the Shift where you work before report !", vbCritical, "Warning, Shift not selected" Report.Value = False Else Report.Value = Value End If End sub ================================================== -- Lorenzo Díaz Cad Technician What...

XmlDsigC14NTransform signedXml.ComputeSignature()
1. signedXml.ComputeSignature() outputs a digest value of something. what is it? I mean, how can i get it? I get the canonical form of my xml with XmlDsigC14NTransform then digest it but the digest value is different. 2.signedXml.ComputeSignature() uses XmlDsigC14NTransform. But how? What are the parameters? I also need to obtain canonicalized XML in C14N format, but I haven't discovered how to do it. When I compare the DigestValue gen'd by ComputeSignature and my own DigestValue gen'd using ComputeHash, I get different values, but only when namespaces are involved. "Lemba...

Does not work in 2003
The following code will not work in excel 2003, it stops on the line: tintandshade=0 is there a work around? Cells.Select With Selection.Interior .Pattern = xlNone .TintAndShade = 0 .PatternTintAndShade = 0 End With begin 666 Ed Davis.vcf M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D1A=FES.T5D#0I&3CI%9"!$ M879I<PT*3DE#2TY!344Z160-"D5-04E,.U!2148[24Y415).150Z961 9&%N M=F5R<W-O9G1W87)E+F-O;0T*4D56.C(P,#DP-S$T5# P,30Q.%H-"D5.1#I6 &0T%21 T* ` end Don't include that line (or the line after, too!)????? If you have to use...

Running Access 2003 db in 2007, and a few forms don't work
I have a database that's been updated from at least Access 97 (maybe Access 2, I can't remember anymore) and has been running fine in Access 2003 for years. My client upgraded to Vista with Office 2007. Almost everything in the database works fine, except 3 forms. Each of these forms has a tab control. Two of the forms have subforms on some of the tabs, one doesn't. When I try to open the forms in Access 2007 running on Vista in Virtual PC, I get the error "There isn't enough memory to perform this operation. Close unneeded programs and try the operation again."...