Dec
18
Written by:
Don Worthley
12/18/2008 12:15 PM
If you're running a DotNetNuke site on Windows Server 2008 with IIS 7, there are some great new features you can use. In fact, you'll see some of them in use on this site, like the ability to have extensionless URLs. In order to achieve the extension-less URL effect1, I had to switch my server from classic mode to integrated mode, and this switch caused the Captcha images throughout the site to stop working. Here's how to solve this problem.
It turns out that the solution is easier than I thought.
When you switch to integrated mode in IIS 7, the HTTP handlers are now defined in a different location in web.config. You can leave the handlers defined in the httpModules section under system.web. But any of these handlers that you want to have configured for IIS when running in integrated mode need to also have entries under the new system.webServer node as follows:
(click to enlarge)
There's probably a commented section in web.config that I missed. Either way, here's the fix for Google to index and hopefully you to find if you're wondering like I was what happened to my Captcha images.
1
This effect is also made possible by the use of the URL Master module from iFinity, which I highly recommend.
Tags:
3 comment(s) so far...
Well Don,
This helped me out of a big bind. RSS on my front page was broken. I looked in the section you mentioned and actually found a typo. It said RSSJandler instead of RSSHandler.
Problem solved. Thanks for sharing.
By Phil Speth on
2/14/2009 3:08 PM
|
Thanks Phil. I liked your comment on the recent "Not Open Source Enough" blog entry. Celebration is great advice for the project right now.
By Don Worthley on
2/14/2009 5:18 PM
|
I have been experiencing some captcha problems with DNN 4.9.1 running on IIS7, but not in Integrated mode. The app pool is asp.net 2.0 classic.
Captcha images seem to occasionally appear broken. There is no pattern as to why this is happening, I get the infamous "input string was not in a correct format" error in the DNN event log. (System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at DotNetNuke.UI.WebControls.CaptchaControl.GenerateImage(String encryptedText))
The site is using Akamai's caching services, but one of our first actions was to exclude the captcha path from caching. Moreover, the same happens in an identical virtual server a staging version of the site is installed on, where no akamai caching is present, of course.
I am using the DNNArticle module, which uses the core captcha code to display captcha on its comment forms.
Any ideas?
By Sotiris Filippidis on
10/16/2009 4:03 AM
|