CaptchaImage

0
August 17, 2011

I am having a problem with my site. I have a Captcha that works fine on the local machine, It will give an image with the follwoing link --  

http://localhost:55181/Cap tchaImage. ashx? spec= bFx6sd9EvJ BG4WyaA6Pb 4G6BY3woaw yU%2bYCU%2 bjcFLRVJ7x ULK%2fuuhy 8D351tK0wg

    But when I try and use it on the Server, discountasp.net I get the red X for a picture and this as the link for the picture

http://www.site.com/MFFO/C aptchaImag e.ashx?

On the webpage in dev. mode it says: Error Rendering Control - captchaAn unhandled exception has occurred.

The application relative virtual path '~/CaptchaImage.ashx' cannot be made absolute, because the path to the application is not known.

The codes is as below:

If it helps this is from the Club Starter Kit from

http://www.codeplex.com

.

Thanks

Chris

'Web.Config file:
<add verb="" path="CaptchaImage.ashx" type="Subkismet.Captcha.CaptchaImageHandler, Subkismet"/>
'Page: 
<sbk:CaptchaControl id="captcha" 
    runat="server" 
    ErrorMessage="The NO BOT code you entered is invalid." 
    Display="dynamic"
    CaptchaLength="5"
    ValidationGroup="comment" />
'aspx page on button submit:(this should not matter as it works local as long as I have the right captcha)
rotected Sub AddComment_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddComment.Click
        If Page.IsValid = True Then
            Dim TheQueryString As Int32 = CInt(Request("id"))
            Dim mem As MembershipUser = Membership.GetUser()
            Dim gui As New Guid(mem.ProviderUserKey.ToString)
            Dim name As String = ClubStarterKit.Web.Members.FirstAndLastName(gui)
            Dim email As String = mem.Email.ToString()
            BlogComments.Insert(TheQueryString, name, email, txtComment.Text)
            txtComment.Text = ""
            UpdatePanel1.Update()
        End If
    End Sub

Comments See all(0)

Add comment
0
August 17, 2011

AH fixed it.  Has to do with running in IIS 7 and on the local machine

Now that we've covered that, if your ASP.NET app has HTTP modules and you want to make sure it runs in both IIS6 and IIS7 Integrated Pipeline mode (from here on out just referred to as IIS7), you need to make some changes to web.config (there are other things to consider as well when running an ASP.NET site under IIS7, so definitely check out this article first for details). The web.config changes needed are for your HTTP modules and handlers. For IIS6, they were configured in the <system.web> section, as such:

<system.web>    </httpModules>        <add name="..." type="..." />    </httpModules>    <httpHandlers>        <add verb="...." path="..." type="..." />    </httpHandlers></system.web>

However, to get these to work in IIS7 you must *move them* from the <system.web> section to the new <system.webServer> section, which is what IIS7 requires when running in Integrated Pipeline mode (it's not needed for Classic Pipeline mode). So instead of the above you'd have this instead:

<system.webServer>    </modules>        <add name="..." type="..." />    </modules>    <handlers accessPolicy="Read, Write, Script, Execute">        <add verb="...." name="..." path="..." type="..." />    </handlers></system.webServer

>

Notice there are a couple slight changes, which means you can't just copy and paste these as-is from <system.web> into <system.webServer>:

<httpModules> and <httpHandlers> have been renamed to <modules> and <handlers>, respectively.

Each handler in IIS7 requires a name attribute. If you don't specify it, you'll get an error message.

The handlers node has an optional, but good-to-define accessPolicy attribute. This value depends on your handlers, so use the ones that are right for you.

a work around would have been to switch the Application Pool Pipeline Mode from integrade to classic but it is better to get it to work with IIS 7 to get all things good!

Points for all~!

0
August 17, 2011

there is some error in server side image....

http://www.site.com/MFFO/C aptchaImag e.ashx?

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /MFFO/CaptchaImage.ashx

0
August 17, 2011

Looks like a pathing issue, it can't find the relative path because the path is not known.  Is there a variable in the web.config file that needs to be setup for pathing for that Captcha control?

0
August 17, 2011

Don't you need the querystring to generate the CAPTCHA image? Have you tried the site URL with the querystring like this?

http://www.site.com/MFFO/C aptchaImag e.ashx? spe c=bFx6sd9E vJBG4WyaA6 Pb4G6BY3wo awyU%2bYCU %2bjcFLRVJ 7xULK%2fuu hy8D351tK0 wg

0
August 17, 2011

Well, I downloaded the Club Starter Kit, the Extended Club Starter Kit, and the ASP.NET Extended Club Site Starter Kit, and I don't see any Captcha controls anywhere...  which one exactly did you get?

0
August 17, 2011

1) I do not get an error when I run it local.  Then when running on the server it bugs out.  I was thinking it had to do with permissions on a folder maybe but can't find anything.  But then there is an error on the developing page saying:     Error Rendering Control - captchaAn unhandled exception has occurred.

The application relative virtual path '~/CaptchaImage.ashx' cannot be made absolute, because the path to the application is not known.

2) the only mention of the Captcha in the web.config is :

     <add verb="*" path="*CaptchaImage.ashx" type="Subkismet.Captcha.Ca

ptchaImage

Handler, Subkismet"/>

3) The path is random on each creation.

4)  It is on the blog reply portion.

0
August 17, 2011

This site talks about the issue and a fix but not sure that I understand.

http://community.discounta sp.net/def ault.aspx? f=5&m=2978 4

Related Questions

Cookie Issue

Can anyone see why the &quot;TEST&quot; cookie would be getting set twice? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Create a CAPTCHA Class Read More

Views

0

Votes

0

Answers

8

August 16, 2011

error message "Could not load type" for a .NET 1.1 asp project converted to VS 2008 .NET 3.5

I am working with some code that was developed in the year 2004. So I suppose that it is .NET 1.1 code. &#160; I created a visual studio 2008 project but am getting an error when I try and build the c Read More

Views

54

Votes

0

Answers

3

August 16, 2011

.NET Form to ASP Confirmation Page - More CAPTCHA Samples

I am looking at some CAPTCHA codes and I found a .NET ) CAPTCHAImage . &#160;This one seems pretty easy to read, but if anyone has more examples, please feel free to post them (I also found NuCaptcha Read More

Views

29

Votes

0

Answers

24

August 16, 2011

This is the very first question

Hello guys! This is the first post in this site Read More

Views

2k

Votes

4

Answers

2

January 08, 2016

report values not showing up.

I have a crystal report which I pass a DataSet to using VB.NET. The report was working fine, but then I make some changes to the import query and now nothing shows up in the crystal report. Crystal do Read More

Views

1k

Votes

0

Answers

12

September 06, 2005

Event log doesn't overwrite as needed in SP4

Hello All, After upgrading from SP3 to SP4 on several Windows 2000 PRO machines everything looked fine, but from time to time applications can&#39;t write to the event log. When I try to view the appl Read More

Views

1k

Votes

0

Answers

9

May 11, 2003

"Failed to self-register XYZ.dll"

Hi there, I wrote a OLE-automation-server DLL in VB4.0. I use Installshield Express to install it as part of my program on the target computers. Now on some computers I get the message &quot;Failed to Read More

Views

8k

Votes

0

Answers

2

November 08, 1998

Please help understand these notes on image processing

Can someone please help me understand these lecture notes... On the right of the page; What does &quot;normalised by one notion of the area of a pixel&quot; mean? On the first formula for A, Is that a Read More

Views

1k

Votes

0

Answers

3

February 05, 2009

Can someone please explain this paragram on the chain rule in image processing

Please see the screenshot, How is 3133030 got from 10103322? Read More

Views

1k

Votes

0

Answers

1

January 05, 2009

AD on 2003

We have created an AD Domain on Windows 2000 Server with no problems. We just created an AD Domain on Windows 2003 and we&#39;re getting some weird problems. Both of these domains are behind firewalls Read More

Views

1k

Votes

0

Answers

15

May 11, 2003

ADDT ASP Upload Error " Type mismatch: 'tNG_isFileInsideBaseFolder' "

I am trying to create a simple insert record and upload image function on an ASP page built using Adobe Dreamweaver Developer Toolkit. I have done this many times before with no problem, however, i ha Read More

Views

1k

Votes

0

Answers

0

November 02, 2008

MYSQL Select query with custom ORDER BY

Hi, is it possible to customize the order of the returned rows in mysql? Example: I have a Table with a column &quot;name&quot;, now I want to have all entries ordered by name, but I want the entries Read More

Views

1k

Votes

0

Answers

5

July 02, 2010

Folder Redirection in Server 2003

We have a Windows Server 2003 Standard Ed. Is there a way to redirect the users my documents to a folder that has already been created on the server? Read More

Views

1k

Votes

0

Answers

2

July 05, 2007

Partiton magic  version 8.0 having error 1523 while executing batch

I followed the partition magic 8.0 wizard to partition my hard disk while rebooting &#160;I came across this problem &#160;&quot;error 1523 while executing batch&quot; What can I do to solve this prob Read More

Views

1k

Votes

0

Answers

2

May 11, 2003

Please explain this paragraph in image processing (screenshot attached)

Two questions; How is the equation (10.1-15) formed? &quot;are isotropic for rotation increments of 90 degrees and 45 degrees respectively&quot; What does this mean Read More

Views

1k

Votes

0

Answers

7

January 05, 2009

xp_cmdshell with net use

Hi, when I use &#39;net use \192.168.0.1\c$ password /user:username&#39; at the command prompt, it works fine. &#160;But if i try to use it in sql with &quot; exec master..xp_cmdshell &#39;net use \19 Read More

Views

978

Votes

0

Answers

5

April 11, 2003

hp ux11

i have a hp ux11 server. and i edited the /etc/resolv.conf to use my win2003 server dns server. That went fine, however, I would like to go the other way and add an entry on my win2003 dns to resolve Read More

Views

610

Votes

0

Answers

3

October 12, 2009

Using an application over a LAN

I have written an application that needs to be used on a LAN. &#160;The application setup wizard takes care of registering everything on a single PC, but how do you go about writing a setup program th Read More

Views

535

Votes

0

Answers

9

August 07, 1998

Need subnet of 12 IPs.

Please, Can someone help me to create a subnet consisting of 12 IP&#39;s. Thanks.. Read More

Views

538

Votes

0

Answers

5

April 11, 2003

Drill down in a cross-tabl report

Hello, Would some experts to show me if it is possible to do drill-up or drill-down (or both) in a cross-tab report? I would also like to know if it is possible to control what fields to be displayed/ Read More

Views

439

Votes

0

Answers

0

September 06, 2005