How to get source code to fix "That assembly does not allow partially trusted callers" error?

1279 views
Skip to first unread message

Nickname unavailable

unread,
Dec 24, 2010, 9:27:30 AM12/24/10
to reCAPTCHA
After googling around, it appears that the only fix for a
"System.Security.SecurityException: That assembly does not allow
partially trusted callers" error associated with the DLL for
recaptcha:RecaptchaControl is to recompile the code myself and allow
permissions for partially trusted callers (this is for a project with
a client who appears to be using shared hosting). I've located the SVN
at http://code.google.com/p/recaptcha/source/browse/, but when trying
to run an "SVN Checkout" with TortoiseSVN, I get the following error:

"Server sent unexpected return value (405 Method Not Allowed) in
response to
OPTIONS request for 'http://code.google.com/p/recaptcha/source/
browse'"

When I download individual files from
http://code.google.com/p/recaptcha/source/browse/#svn%2Ftrunk%2Frecaptcha-plugins%2Fdotnet
(just right-clicking and doing a Save As in the browser) and running
the solutions/project files in Visual Studio, I get errors.

Any thoughts on how I can get the source code to recompile or, better
yet, deal with the "That assembly does not allow partially trusted
callers" error directly?

Thanks,
John

Nickname unavailable

unread,
Dec 24, 2010, 9:36:03 AM12/24/10
to reCAPTCHA
Ah...figured it out...had to use http://recaptcha.googlecode.com/svn/trunk/



On Dec 24, 8:27 am, Nickname unavailable <jscif...@gmail.com> wrote:
> After googling around, it appears that the only fix for a
> "System.Security.SecurityException: That assembly does not allow
> partially trusted callers" error associated with the DLL for
> recaptcha:RecaptchaControl is to recompile the code myself and allow
> permissions for partially trusted callers (this is for a project with
> a client who appears to be using shared hosting). I've located the SVN
> athttp://code.google.com/p/recaptcha/source/browse/, but when trying
> to run an "SVN Checkout" with TortoiseSVN, I get the following error:
>
> "Server sent unexpected return value (405 Method Not Allowed) in
> response to
> OPTIONS request for 'http://code.google.com/p/recaptcha/source/
> browse'"
>
> When I download individual files fromhttp://code.google.com/p/recaptcha/source/browse/#svn%2Ftrunk%2Frecap...

Adrian Godong

unread,
Dec 24, 2010, 9:47:20 AM12/24/10
to reca...@googlegroups.com, reCAPTCHA
And don't forget to send a patch back to trunk for other people who needs similar implementation.

I don't have any exp with shared hosting, that's why it's not there.

---
Adrian Godong

> --
> You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> To post to this group, send email to reca...@googlegroups.com.
> To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.
>

rafaelbo

unread,
Jan 5, 2011, 12:42:06 AM1/5/11
to reCAPTCHA
To solve this issue you need to added on the recaptcha project this
code: [assembly: System.Security.AllowPartiallyTrustedCallers].
I created a new project and make this change. Works like a charm in
GoDaddy and probably will work in other hostings too.
You can download the solution at
http://code.google.com/p/recaptcha-with-allowpartiallytrustedcallers/downloads/detail?name=Recaptcha.rar&can=2&q=#makechanges

I hope it helps.

On Dec 24 2010, 9:27 am, Nickname unavailable <jscif...@gmail.com>
wrote:
> After googling around, it appears that the only fix for a
> "System.Security.SecurityException: Thatassemblydoesnotallowpartiallytrustedcallers" error associated with the DLL for
> recaptcha:RecaptchaControl is to recompile the code myself andallow
> permissions forpartiallytrustedcallers(this is for a project with
> a client who appears to be using shared hosting). I've located the SVN
> athttp://code.google.com/p/recaptcha/source/browse/, but when trying
> to run an "SVN Checkout" with TortoiseSVN, I get the following error:
>
> "Server sent unexpected return value (405 MethodNotAllowed) in
> response to
> OPTIONS request for 'http://code.google.com/p/recaptcha/source/
> browse'"
>
> When I download individual files fromhttp://code.google.com/p/recaptcha/source/browse/#svn%2Ftrunk%2Frecap...

Cameron Boyer

unread,
Sep 12, 2012, 12:42:16 PM9/12/12
to reca...@googlegroups.com
Thank you for this fix.  I am using Godaddy with: 
  • deluxe Windows hosting.
  • ASP.NET version 3.5 with IIS 7. 

 Using your rebuilt dll with the  [assembly: System.Security.AllowPartiallyTrustedCallers]  made my errors go away.

Andy Campbell

unread,
Aug 20, 2013, 6:23:31 PM8/20/13
to reca...@googlegroups.com
rafaelbo YOU ARE A STARRRRRRR !!! This worked like a charm after I had been wrestling with the problem for over 4 hours !!!

Ali Ejaz

unread,
Nov 5, 2013, 11:08:58 AM11/5/13
to reca...@googlegroups.com
Hey Cameron i tried every possible thing... added the assembly but still captcha wont work with godaddy windows hosting (deluxe) / .Net 3.5 framework IIS7 guide me to some solution.

Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
 
thanks.
Ali Ejaz
Reply all
Reply to author
Forward
0 new messages