views:

18

answers:

0

I've downloaded the recaptcha.dll in both 1.0.1.0 and 1.0.4.0. When trying to render the control, I get the following exception:

Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Stack Trace:[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0 System.Web.UI.NamespaceTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean throwOnError) +209

The solution to this, as provided by a quick Googling, is to use caspol.exe to add full trust to the recaptcha.dll assembly.

C:\%path%\caspol -af C:\inetpub\wwwroot\%path%\bin\recaptcha.dll

At this point, I get the following error:

ERROR: This assembly is not strong name signed

Short of downloading the source code and recompiling it locally, is there any other way to get this working?