This is a migrated thread and some comments may be shown as answers.

Broken Image Link in SharePoint web part

2 Answers 85 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Brian Farnhill
Top achievements
Rank 1
Brian Farnhill asked on 21 Feb 2010, 09:34 PM

 

 

Hi there,

I am currently building a proof of concept application for a client  and I'm trying to integrate the RadCaptcha control into a webpart I am creating for a MOSS 2007 web site, and I'm having a problem with it, being that the image for the CAPTCHA is always broken.

I have added the following to my web.config file:

<httpHandlers> 
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" /> 
</httpHandlers> 

and:

<handlers> 
<add name="Telerik_Web_UI_WebResource_axd"  verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd"  type="Telerik.Web.UI.WebResource, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
</handlers> 

The reason I am fully qualifying the assembly name is because I am putting the Telerik DLL's in the GAC (both Telerik.Web.UI and Telerik.Web.Design - I have checked the version numbers and they match)

I am creating the RadCaptcha control in code like this:

protected override void CreateChildControls()  
{  
    // ...  
 
    RadCaptcha captcha = new RadCaptcha();  
    Controls.Add(captcha);  
 
    // ...  

Any ideas why it isn't creatng the image for me? Help is appreciated

2 Answers, 1 is accepted

Sort by
0
Brian Farnhill
Top achievements
Rank 1
answered on 22 Feb 2010, 12:09 AM
Further to the above, here is the error I have found that I am getting when the images are trying to load:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error:

Line 148:      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
Line 149:      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
Line 150: <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />Line 151:    </httpHandlers>
Line 152:    <customErrors mode="Off" />
0
Brian Farnhill
Top achievements
Rank 1
answered on 22 Feb 2010, 12:13 AM
Wow - just had a total brain snap moment there - had another look at my config line and realised I was typing it wrong :-)

Here is what should have been in the web.config for anyone who is interested

<httpHandlers> 
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" /> 
</httpHandlers> 
<handlers> 
<add name="Telerik_Web_UI_WebResource_axd"  verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd"  type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
</handlers> 

I'll return to my village in shame now :-P
Tags
Captcha
Asked by
Brian Farnhill
Top achievements
Rank 1
Answers by
Brian Farnhill
Top achievements
Rank 1
Share this question
or