Re: .Net RC - Could not create the XML transformation....

David Waite <[email protected]> Tue, 05 Aug 2003 11:53:24 -0600
Newsgroups gmane.comp.sourceid.sso.devel
Message-ID <[email protected]>
Oops, I should start reading -all- my email before replying ;-)

Does it seem appropriate to include a tiny .NET console application 
which will attempt to make this change for the developer? Assuming there 
are no wild security problems, I should be able to get this finished 
very quickly.

-David Waite

David Waite wrote:

> Yes, this is unfortunately something you need to change by hand with 
> the current .Net frameworks; it is described in the README already.
>
> change the  machine.config file (should be in 
> C:\WINDOWS\Microsoft.NET\Framework\<version>\config) to add the 
> following section:
>
> <!-- Other configuration settings. -->
> <mscorlib>
>  <cryptographySettings>
>    <cryptoNameMapping>
>      <cryptoClasses>
>        <cryptoClass 
> exc14n="Microsoft.Web.Services.Security.XmlDsigExcC14NTransform, 
> Microsoft.Web.Services"/>
>        <cryptoClass 
> exc14n.comments="Microsoft.Web.Services.Security.XmlDsigExcC14NWithCommentsTransform, 
> Microsoft.Web.Services"/>
>      </cryptoClasses>
>      <nameEntry name="http://www.w3.org/2001/10/xml-exc-c14n#" 
> class="exc14n"/>
>      <nameEntry 
> name="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" 
> class="exc14n.comments"/>
>    </cryptoNameMapping>
>  </cryptographySettings>
> </mscorlib>
>
> For those who don't edit XML files often, I usually get away with 
> pasting this on the next to last line (right before 
> "</configuration>"). This instructs the System.Security.CryptoConfig 
> class on how to map the specified names to particular classes. It is 
> unfortunate that the CryptoConfig class does not pay attention to the 
> same section added to the local Web.config.
>
> -David Waite
>
> [email protected] wrote:
>
>> I now have the IDP and SP samples that came with the .Net RC edition 
>> working - almost.
>>
>> I can log in to the SP and when i select the "Click to Federate" link 
>> i am taken to the IDP Authenticator module at logonpost.aspx.
>> However, when i type in a username and password and click the submit 
>> button, i get the problem below. Anyone got any hints on I should do 
>> to fix this?
>>
>>
>> Server Error in '/idp-sample' Application.
>> -------------------------------------------------------------------------------- 
>>
>>
>> Could not create the XML transformation identified by the URI 
>> http://www.w3.org/2001/10/xml-exc-c14n#. Description: An unhandled 
>> exception occurred during the execution of the current web request. 
>> Please review the stack trace for more information about the error 
>> and where it originated in the code.
>> Exception Details: 
>> System.Security.Cryptography.CryptographicException: Could not create 
>> the XML transformation identified by the URI 
>> http://www.w3.org/2001/10/xml-exc-c14n#.
>>
>> Source Error:
>>
>> Line 134:                // Lastly, pass control back to SourceID, 
>> which will
>> Line 135:                // consequently pass control back to the SP.   
>> Line 136:                
>> SourceID.HttpHandlers.Authenticator.Process(Context);
>> Line 137:            }
>> Line 138:            else
>>
>>
>> Source File: c:\inetpub\wwwroot\idp-sample\LogonPost.aspx.cs    Line: 
>> 136
>> Stack Trace:
>>
>> [CryptographicException: Could not create the XML transformation 
>> identified by the URI http://www.w3.org/2001/10/xml-exc-c14n#.]
>>   System.Security.Cryptography.Xml.SignedXml.ComputeSignature()  1158
>>   SourceID.XmlUtils.SignResponse(ResponseAbstractType response, 
>> AsymmetricAlgorithm key, XmlSerializer serializer, Boolean 
>> isDebuggingEnabled) in C:\Documents and Settings\steven\My 
>> Documents\downloads\SourceID.NET-0.3\SourceID\XmlUtils.cs:324
>>   
>> SourceID.HttpHandlers.Authenticator.HandleAuthReturnToSP(HttpContext 
>> context, AuthnRequestType authn_req, ProviderDirectory dir, 
>> SPDescriptorType sp) in C:\Documents and Settings\steven\My 
>> Documents\downloads\SourceID.NET-0.3\SourceID\HttpHandlers\Authenticator.cs:435 
>>
>>   
>> SourceID.HttpHandlers.Authenticator.HandleAppAuthenticated(HttpContext 
>> context, AuthnRequestType authn_req, Object uid, ProviderDirectory 
>> dir, SPDescriptorType sp) in C:\Documents and Settings\steven\My 
>> Documents\downloads\SourceID.NET-0.3\SourceID\HttpHandlers\Authenticator.cs:242 
>>
>>   SourceID.HttpHandlers.Authenticator.Process(HttpContext context) in 
>> C:\Documents and Settings\steven\My 
>> Documents\downloads\SourceID.NET-0.3\SourceID\HttpHandlers\Authenticator.cs:86 
>>
>>   idp.LogonPost.Page_Load(Object sender, EventArgs e) in 
>> c:\inetpub\wwwroot\idp-sample\LogonPost.aspx.cs:136
>>   System.Web.UI.Control.OnLoad(EventArgs e)  67
>>   System.Web.UI.Control.LoadRecursive()  35
>>   System.Web.UI.Page.ProcessRequestMain()  720
>>
>>
>>
>>
>> -------------------------------------------------------------------------------- 
>>
>> Version Information: Microsoft .NET Framework Version:1.1.4322.573; 
>> ASP.NET Version:1.1.4322.573 
>> _______________________________________________
>> sso-dev mailing list
>> [email protected]
>> http://mail.sourceid.org/mailman/listinfo/sso-dev
>>  
>>
>
>
> _______________________________________________
> sso-dev mailing list
> [email protected]
> http://mail.sourceid.org/mailman/listinfo/sso-dev