where to place recaptcha.dll on web server?

494 views
Skip to first unread message

jfalberg

unread,
Mar 12, 2012, 1:56:12 PM3/12/12
to reCAPTCHA
ok so I've followed the instructions and got to work on my development
workstation the sample recaptcha code for asp.net in c#, but when I
uploaded both my asp.net and Bin\recaptcha.dll I get a vague runtime
error along with something that relates to the web.config file:

Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons).
It could, however, be viewed by browsers running on the local server
machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within
a "web.config" configuration file located in the root directory of the
current web application. This <customErrors> tag should then have its
"mode" attribute set to "Off".

Please advise as to how I can get this to work, as my asp page at
least has the following directive at least:

<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha"
Assembly="Recaptcha" %>

jfalberg

unread,
Mar 12, 2012, 8:52:38 PM3/12/12
to reCAPTCHA
Hello? Do I need to add something to my web.config file or IIS in
order for my recaptcha to work? The test page I am particularly
having problems with is at
http://www.bhhlegal.com/helloworldc.aspx
all I did was upload that along with Bin\recaptcha.dll which works
when I perform within visual studio 2010 on my local workstation, but
not when I ftp to target site.

PJH

unread,
Mar 12, 2012, 9:01:36 PM3/12/12
to reca...@googlegroups.com
Not used .NET, but....


On Tue, Mar 13, 2012 at 12:52 AM, jfalberg <jefff...@gmail.com> wrote:
all I did was upload that along with Bin\recaptcha.dll

From http://code.google.com/apis/recaptcha/docs/aspnet.html

# Add a reference on your website to library/bin/Release/Recaptcha.dll: On
# the Visual Studio Website menu, choose Add Reference and then click the
# .NET tab in the dialog box. Select the Recaptcha.dll component from the
# list of .NET components and then click OK. If you don't see the component,
# click the Browse tab and look for the assembly file on your hard drive.

Is the path correct?

--
PJH


jfalberg

unread,
Mar 12, 2012, 9:03:24 PM3/12/12
to reCAPTCHA
Here's my source code for helloworldc.aspx:

<%@ Page Language="C#" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha"
Assembly="Recaptcha" %>
<script runat=server>
void btnSubmit_Click(Object sender, EventArgs, e) {
If (Page.IsValid) {
lblResult.Text = "You Got It!";
lblResult.ForeColor = Drawing.Color.Green;
}
else {
lblResult.Text = "Incorrect";
lblResult.ForeColor = Drawing.Color.Red;
}
} </script>
<html>
<body>
<form runat="server">
<asp:Label Visible=true ID="lblResult" runat="server" />
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
Theme="clean"
PublicKey=(hidden for security)
PrivateKey=(hidden for security)
/>
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click" />
</form>
</body>
</html>

jfalberg

unread,
Mar 13, 2012, 8:56:18 AM3/13/12
to reCAPTCHA
One of the problems I am having with that link is that it said that a
"C# sample is included with the library download" but when I look at
the files in the download, all I see is a Recaptcha.dll & a
Recaptcha.pdb file and don't see how I can find a sample that will
help guide me better. I am obviously doing something wrong with the
source code I posted from http://www.bhhlegal.com/helloworldc.aspx

The intended page I want to add the recaptcha code to was written in
aspx c# for side menu purposes as part of the website design and maybe
all I need is to add something to my IIS, not sure really nor how.

On Mar 12, 9:01 pm, PJH <pauljherr...@gmail.com> wrote:
> Not used .NET, but....
>
> On Tue, Mar 13, 2012 at 12:52 AM, jfalberg <jefffalb...@gmail.com> wrote:
> > all I did was upload that along with Bin\recaptcha.dll
>
> Fromhttp://code.google.com/apis/recaptcha/docs/aspnet.html

jfalberg

unread,
Mar 13, 2012, 9:18:33 AM3/13/12
to reCAPTCHA
updated source code (where's the edit button here?) to clean up vs2010
error/warning messages at least:

<%@ Page Language="C#" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha"
Assembly="Recaptcha" %>
<script runat="server">
void btnSubmit_Click(Object sender, EventArgs e) {
if (Page.IsValid) {
lblResult.Text = "You Got It!";
lblResult.ForeColor = System.Drawing.Color.Green;
}
else {
lblResult.Text = "Incorrect";
lblResult.ForeColor = System.Drawing.Color.Red;
}
} </script>
<html>
<head></head>
<body>
<form runat="server">
<asp:Label Visible="true" ID="lblResult" runat="server" />
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
Theme="clean"

PublicKey="*************************************" (masked for
security)

PrivateKey="*************************************" (masked for
security)
/>
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click" />
</form>
</body>
</html>

new error message when I click on http://www.bhhlegal.com/helloworldc.aspx
as I still don't understand how to add the recaptcha reference to iis
or web.config somewhere.

PJH

unread,
Mar 13, 2012, 9:23:58 AM3/13/12
to reca...@googlegroups.com


On Tue, Mar 13, 2012 at 1:18 PM, jfalberg <jefff...@gmail.com> wrote:
new error message when I click on http://www.bhhlegal.com/helloworldc.aspx

The error I get when I go there is:

The WebResource.axd handler must be registered in the configuration to process this request.


Which doesn't appear to be a reCAPTCHA related issue.



--
PJH


jfalberg

unread,
Mar 13, 2012, 10:22:28 AM3/13/12
to reCAPTCHA
In looking at my application pool settings for this site in IIS 7, I
see it's currently set at .NET Framework v2.0.50727 with Manage
pipeline mode as Integrated. I'm not sure if changing to .NET
Framework v4.0.30319 will fix the problem or break its current
functionality. And is there anywhere I need to add this
WebResource.axd handler and any other required stuff in my IIS
settings for this site?

On Mar 13, 9:23 am, PJH <pauljherr...@gmail.com> wrote:
> On Tue, Mar 13, 2012 at 1:18 PM, jfalberg <jefffalb...@gmail.com> wrote:
> > new error message when I click onhttp://www.bhhlegal.com/helloworldc.aspx
>
> The error I get when I go there is:
>
> *The WebResource.axd handler must be registered in the configuration to
> process this request.*

jfalberg

unread,
Mar 13, 2012, 10:26:58 AM3/13/12
to reCAPTCHA
In my IIS I see there is a Handler for WebResource.axd with a type of
System.Web.Handlers.AssemblyResourceLoader named
AssemblyResourceLoader-Integrated, Request Restrictions are set to
GET,DEBUG and Access to Script.

On Mar 13, 9:23 am, PJH <pauljherr...@gmail.com> wrote:
> On Tue, Mar 13, 2012 at 1:18 PM, jfalberg <jefffalb...@gmail.com> wrote:
> > new error message when I click onhttp://www.bhhlegal.com/helloworldc.aspx
>
> The error I get when I go there is:
>
> *The WebResource.axd handler must be registered in the configuration to
> process this request.*

PJH

unread,
Mar 13, 2012, 10:31:34 AM3/13/12
to reca...@googlegroups.com


On Tue, Mar 13, 2012 at 2:26 PM, jfalberg <jefff...@gmail.com> wrote:
In my IIS

Ok - this is getting out of my comfort zone; I'm not going to be much more use to you on this I'm afraid - wait and see if anyone else on the list pipes up.

--
PJH


jfalberg

unread,
Mar 13, 2012, 11:07:26 PM3/13/12
to reCAPTCHA
I'm quite surprised nobody else seems to have experienced this problem
here. There's got to be a solution hopefully, just frustrates me that
I can't get this done as easily expected.

On Mar 13, 10:31 am, PJH <pauljherr...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages