OdeToCode IC Logo

A Cryptographic Function Has Failed in ASP.Net

Sunday, December 28, 2003
You might run across this scary error message using MSMQ from ASP.NET. By default, MSMQ requires an authenticated (cryptographically signed) message. The signing happens automatically if your code is running with the credentials of a domain account.

There are two solutions to the problem. The first solution is, naturally, to run your ASP.NET page with the credentials of a domain user. A domain user will have a cryptographic certificate available in Active Directory for the runtime to use for signing. You could do this, for example, using impersonation.

Another solution, as long as you are in a secure environment, is to disable authentication for queued components. Set the COM+ queued component application to have an authentication level of “None”.