Products » Support Forums 

Support Forums

HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl MasterMultiple problems with CAPTCHA and Dynamic RegistrationMultiple problems with CAPTCHA and Dynamic Registration
Previous
 
Next
New Post
1/7/2010 3:27 AM
 

Hi Bruce,

I am running into multiple problems with URL Master.  My site is running 5.1.4.  Ideally I would like to use the Advanced CAPTCHA that comes with Dynamic Registration, but at this point I will be happy to get the basic to work.

At first my site was using the standard CAPTCHA which did not work for many/all people. The problem is that DynamicRegistration would throw an error saying that the CAPTCHA field is required and must be filled in - even though the field was filled in correctly!  I contacted DataSprings and they directed me to the following post:

http://captcha.biz/doc/asp.net/captcha-faq.html#implementation-dotnetnuke

I summarize the relevant content from this post in bold blue below:

We're trying to use your product with DotNetNuke 4.5.5, and running into some trouble because of an apparent interaction with the Url Rewriting HttpModule. CAPTCHA image and sound requests are made using relative paths, which are being mangled by the Url Rewriter and never passed to your HttpHandler. Do you have a fix for this?

This issue can be resolved by excluding BotDetect CAPTCHA image and sound paths in the DotNetNuke Url Rewriter configuration. The only additional step necessary for DotNetNuke users is to add:

<RewriterRule>
  <LookFor>.*LanapCaptcha.aspx(.*)</LookFor>
  <SendTo>~/LanapCaptcha.aspx$1</SendTo>
</RewriterRule>

to SiteUrls.config in the base DotNetNuke web site directory and BotDetect CAPTCHA will work properly.

I changed the CAPTCHA field to advanced, added the above code to the file, and attempted to view the form.  The CAPTCHA field did not display. I then logged in as host and tried to go to Admin - User Accounts.  When I did I got the following error in bold red:

500 Server Error
An error occured during processing : if possible, check the event log of the server
Exception:
Object reference not set to an instance of an object.
Stack Trace:
at iFinity.DNN.Modules.UrlMaster.RewriteController.IdentifyByRegEx(String absoluteUri, String queryString, String applicationPath, UrlAction result, FriendlyUrlSettings settings) at iFinity.DNN.Modules.UrlMaster.UrlRewriteModule.CheckForRewrite(Uri requestUri, UrlAction result, Boolean useFriendlyUrls, NameValueCollection queryStringCol, FriendlyUrlSettings settings, Boolean& isPhysicalResource) at iFinity.DNN.Modules.UrlMaster.UrlRewriteModule.ProcessRequest(HttpContext context, HttpRequest request, HttpServerUtility Server, HttpResponse response, Boolean useFriendlyUrls, String requestType, Uri requestUri, UrlAction result, NameValueCollection queryStringCol, FriendlyUrlSettings settings)


When I restored the original SiteUrls.config I was able to access User Accounts. I am now back to square one where CAPTCHA field is viewed as blank even though it is not. The following post on this forum seems related. Unfortunately, the solution was never posted and I never heard of Fiddler before:

http://www.ifinity.com.au/Products/Support_Forums/forumid/8/threadid/2466/scope/posts

What can I do?

Thanks,
Chip

 
New Post
1/7/2010 12:05 PM
Accepted Answer 

Ok - the error in red is likely because of the introduction of a regex error in the rewriting process.  I might have to test this and see if there is a nicer way of handling it.

The blue part speaks of adding a rewriting rule to the standard dnn url rewriting patterns.  What this particular pattern does is circumvent the rewriting by just giving back what was given (ie takes in the captcha url and 'rewrites' back the exact same Url.  I image this strategy successfully works around the DNN provider.

In order to implement this in the Url Master module, add the LanapCaptcha.aspx pattern to the 'doNotRewriteRegex' field by appending |lanapcaptcha\.aspx to the end of the string.

see http://www.ifinity.com.au/Products/KB/Url_Master/topic/Modifying+Advanced+Regex+Patterns for more details on modifying the advanced regex settings with the regex pattern.

This should stop the captcha program from being rewritten, and hopefully allow it to work.  Let me know how you get on, and if possible, direct me to the screen where the captcha problem shows up.  I can run a Fiddler trace and see what is going on. Fiddler is a http traffic monitoring tool available free from microsoft.    Everyone involved in web development should get to know and understand Fiddler because it can tell you a lot about your site, problems, and performance issues.

 
New Post
1/8/2010 6:32 AM
 

Thank you Bruce!

I made the edit you suggested and so far everything seems to be working with the advanced captcha.  I was able to successfully register once on IE7 and again on Firefox.  I am going to have a few other people test it over the next few days.  Unless I post again, you can consider this case solved!

Chip

 
New Post
7/3/2010 4:04 AM
 

Hi Bruce,

I did what you suggest, but after I add the "|lanapcaptcha\.aspx" to the 'doNotRewriteRegex' field, the internal page of the site become unavailable, then I must restore back the web.config file. Any advice?

Thank you,

Alex

 
New Post
7/6/2010 6:30 AM
 
Alex Wawo wrote:

I did what you suggest, but after I add the "|lanapcaptcha\.aspx" to the 'doNotRewriteRegex' field, the internal page of the site become unavailable, then I must restore back the web.config file. Any advice?

Alex - what do you mean by 'internal page of the site becomes unavailable' - are you getting an error, or some other problem. Was the original issue the same as the one described, and have you done the required change to the siteurls.config?


Chief Software Hacker
 
Previous
 
Next
HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl MasterMultiple problems with CAPTCHA and Dynamic RegistrationMultiple problems with CAPTCHA and Dynamic Registration


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.

Please note : If you are posting a new thread for the Url Master module, please include the following information where applicable:

- Url Master version

- DotNetNuke version

- Example Url where possible

- If there is an error, please post the full error text and/or stack trace (from the DotNetNuke event log).