Category Archives: DotNetNuke Tips

DotNetNuke DNN Spam Registrations Problem Fixed

DotNetNuke DNN Sites getting spam registrations – How to stop them

In recent weeks, many of our DNN websites have systematically been targeted for Spam New User Registrations. There has been some discussion around the how and why, and as much as we can tell, the problem is this:

1. Some script kiddy has bothered to write a bot that finds DNN websites. It is not even a good bot, because it is not capable of validating registrations to automated active email addresses. (If you are the creator of the bot… “YOU ARE DOING IT WRONG” as it is not going to bring the Google results you are looking for.)

2. The bot will attempt access to:  www.yoursite.com /?ctl=Register
?ctl=Register

3. This brings into play the default DNN registration process module.

4. This page is currently available if your site has either Public or Verified registrations enabled.

5. Tricks on derating the bot by raising the password complexity appeared to work a short time only.

6. Enabling the inbuilt Captcha is as good as useless, as almost any OCR application can break it.

7. A better simple solution is needed.

 

ReCaptcha is the FIX that is working well

Here at InteractiveWebs, we decided that we would enable Recapcha (a cleaver Google Initiative https://www.google.com/recaptcha/ ) that is harder to be machine broken, and test the results. We found that all the spam registrations stopped once Recaptcha was used.

To do this we created two Free DNN Modules to add Recaptcha to the URL that this bot is using to register on sites. The two modules are to support DNN 6.2 +  and 7x +.

The modules replace the standard captcha control to a recaptcha

From this:

DNNCaptcha

To this:

DNN Spam Registration Stop

This is a good link explaining how Recaptcha came into existence, and why it works well: https://www.youtube.com/watch?v=cQl6jUjFjp4

The Free Solution and Installing iWebs Regsiter

The free modules are available of download here: http://www.interactivewebs.com/DotNetNukeModules/ModuleDownloads.aspx

To install them and fix your site you will need to follow the instructions below:

Step 1 – Register your site for Recaptcah

Go to: https://www.google.com/recaptcha/intro/index.html  and register your domain, or domains. This will give you the ability to use recaptcha on your DNN sites on any domain you like.

DN Google Recaptcha

Step 2 – Copy the Public Key and Private Key for your Domain

You are going to need they keys that this site provides:

DNN Recaptcha Keys

Similar to these.

 

Step 3 – For you DNN site, Turn on the DNN Captcha system.

ADMIN>>SITE SETTINGS>> USER ACCOUNT SETTINGS>>  “Use CAPTCHA for registration” Ticked.

DNN Enable Captcha

Step 4 – Download and Install iWebs – Register

Install our “iwebs- register” module, making sure you pick the one that is for your DNN version.

  • DNN 6.2 And laters: iWebsRegister 62.6.3.0 PA.zip (at time of writing this)
  • DNN 7 and later:  iWebsRegister 72.7.1.0 PA.zip (at time of writing this)

Once installed, you need to add the module to a page as you would any other. We recommend adding it to it’s own page in the DNN Admin menu, and keeping the page Admin Only.

DNN Recaptcha Module Downlaod DNN Recaptcha Module

Step 5 – Configure the iWebs Register Module.

The module you are looking for is called: iWeb’s – Register – You can select the Settings from the module drop down as you would any other DNN module.

DNN Module Settings

 

Enter the Public Key and Private Keu information that you received from your Google Recaptcha registration of your domain. THEN SELECT UPDATE to save the information.

DNN Captcha Settings

Step 6 – Install the Register Control

After saving your public and private keys by clicking “update” you are ready to:

Click on the “Install Register Control”

This will inject the recaptcha setting into your website. So when you hit any registration URL (www.yoursite.com /?ctl=Register) you now get the recaptcah box.

Update to V2 of Recaptcha

Google has released what they call V2 of Recaptcha. We have update the module to support this. The process of updating to V2 goes like this.

1. By default, previously created recaptcha keys are V1. Any updated installs of our module will need to be put into V1 mode (in the settings) to keep working with your V1 keys that you have previously configured into the module. So after updating our module to the latest release, go into the module settings and enable V1 mode for the module to keep working.

2. V2 recaptcha is better than V1. So we would suggest that all users of the module update to V2. To do this, you update our module to the latest release, then go into the Google Recaptcha management page, and delete your domains security keys, then generate new keys for V2. They have instructions on that process, all be is hard to understand.

Once you have new V2 recaptcha keys, you update these new keys back into our module and ensure that the V1 mode is NOT enabled. The V2 recaptcha will then run on your site.

To Remove and Uninstall

Step 1. From the iwebs – Register module settings, click the “Restore Register Control”

DNN Remove Recaptcha

2. Uninstall the iwebs – Register module as you would any other DNN module.

 

Thoughts

This was a quick solution to some script kiddies attempt to attack DNN. I’m actually struggling to find the purpose (if you wrote the bot and you are reading this, I would love to hear why).  There is little threat by the registrations that I can find. More annoying that anything else. While Recaptcah can be broken, it would take some smarts or costs to use online services for the bot, so I suspect they will not bother and recaptcha will reign for this problem. In any case, if they spend some time and effort making the bot work for recaptcah, it is easy enough for us to implement some of the loads of other solutions available to stop them.

Donations

We included a donation button. If you find the solution, blog, research we did, modules we created and responses we provide to be helpful. Please consider throwing us a few $

DNN Popup Greeting–Kill it Good!

In the recent DNN 7 releases, they have unfortunately made by default a popup greeting after sign in, that in theory would drive clients to signup for their spam.

Problem is (like lots of recent DNN features) that the “tick to never show again” does not work, and in some really recent releases, the popup goes crazy and does not allow you to progress into the site.

In other words, they killed their own product with spam crap.

Easy fix. Open the file in the web root, called: Default.aspx.cs

Look for this line: ManageGettingStarted();

Just throw a // before it to comment it out.

Save and restart the IIS site. Should fix it fast and for good.

DotNetNuke – Could not load file or assembly ‘Telerik.Web.UI’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.

image

After upgrading a DNN website, we received this error message.

The underlying cause of the problem is sloppy release version upgrades of the DNN core product.

The issue is that the release.config file in the update versions of DNN references older versions of the Telerik.Web.UI .dll file in the /bin folder of the install versions of DNN. This means that the settings in your newly updated web.config file are referencing an old version of the Telerik file.

The fix is easy

Right click on the Telerik.Web.UI.dll file in your sites /bin folder.

If the file is not there, then download the install version of your DNN site package from http://dotnetnuke.codeplex.com

Then extract the file to the /bin folder.

image

Look at the version number of the file.

Edit your web.config file to match this data:

image

Save and you are done.

DotNetNuke HTML Editor Background Black

When you get a black background in the HTML Editor.

image

The solution is easy.

Look for the file found here:

\Providers\HtmlEditorProviders\Telerik\Config\ConfigDefault.xml

Edit it to add this line:

<property name="CssFiles">~/Providers/HtmlEditorProviders/Telerik/Config/EditorCustom.css</property>

Looking like this:

image

Then edit this file:

\Providers\HtmlEditorProviders\Telerik\Config\EditorCustom.css

To look like this:

body
{
  background-color: white;
  background-image: url(image_path);
  color: black;
}

image

 

That’s about it.

DotNetNuke Can’t Login Index #: 0

The Problem

Index #: 0

image

Recently while working with a DotNetNuke website, we found that attempting to login to the site generated this error:

SQL Exception
Error Details
File 
Error   Index #: 0
Source: .Net SqlClient Data Provider
Class: 17
Number: 1105
Procedure: AddEventLog
Message: System.Data.SqlClient.SqlException: Could not allocate space for object ‘dbo.EventLog’.’PK_EventLogMaster’ in database ‘www.sitedatabase.com’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.SqlDataProvider.AddLog(String logGUID, String logTypeKey, Int32 logUserID, String logUserName, Int32 logPortalID, String logPortalName, DateTime logCreateDate, String logServerName, String logProperties, Int32 logConfigID) at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.WriteLog(LogQueueItem logQueueItem)

After a investigating the site and server we found that this was caused by the SQL server running out of room on the disk hosting the database connected to this DNN site.

The Solution

Free up more space on the SQL database disk.

DotNetNuke (dnn) jQuery problems admin menu

image

DotNetNuke jQuery Problems

Recently there was an update to jQuery that caused some problems with DotNetNuke. The problems include:

  • Strange or missing popup effects in custom jQuery modules
  • Admin menu hiding the menu items on Standard DNN Dark Knight Skin
  • Modules using jQuery failing to function as desired

The Problem

The problem is associated with some bugs in the jQuery released and hosted googleapis. The bugs are not related to DotNetNuke directly but the jQuery used in many instances of jQuery.

The Solution

The solution is an easy one. You just need to login to your DotNetNuke website with a Host Account, and modify the jQuery settings under the HOST / ADVANCED SETTINGS to a more recent and bug free version of jQuery UI.

 

image

Pasting this URL: https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js into the “Hosted jQuery UI URL" and ensuring the “Use Hosted jQuery Version” is ticked.

Upgrading Steps for DotNetNuke from DNN 4.x.x to DNN 6.x.x

image

Specifically we wanted to take a version of DotNetNuke from 4.9.1 to 6.1.3 today and actually found that it worked perfectly.

We did take some steps that helped a lot. This may be of value to some of you.

Before we Began

1. Backed up the entire file system for the website.

2. Backed up the database on SQL server for the site in question.

3. Ensured we had a HOST login account that worked.

4. Ensured the server we were running on (Windows 2008 R2) was patched and running .Net Framework version 3.5 SP1.

5. If your site is busy, work out a way to stop the traffic. One way is to add a portal alias, like test.domain.com in your DNN website. Setup a DNS entry to that test.domain.com points to the IP address of your DNN web server. In IIS, setup a Binding, so that test.domain.com will answer for your site.

Then access the site on test.domain.com and check you can login, etc.

Then remove the binding in IIS for www.domain.com (temporarily while you play upgrade).

This way, the site will not answer normal user access, but will answer you when you go to test.domain.com.

 

Update Path

We suggest the following table for upgrading your DNN Website.

Note: If you are upgrading a version prior to DNN 4.6.2, then you will need to manually update the web.config file. After this version the updates are automatic.

 

Steps On Upgrade

On Codeplex, Click on View All Downloads

image

Find the version for the next upgrade step from the table above. Then find the Version Upgrade download link.

image

Download the .zip file to your server. Then extract the contents directly over the existing website directory structure.

You will be asked to overwrite files, Tick yes to all.

You will be asked to overwrite folders, Tick Apply to all – And continue.

Once you have extracted, hit your website in a browser, and watch the upgrade happen before your eyes.

Repeat the steps of backing up after each successful update, and download the next update package and repeat the process.

 

Tricky Bits

If you are using the XML module, on a DNN version before 5.3.0, then you should obtain the latest update of the module before moving past 5.3.0.

If you have the Ifinity URL Master module. We suggest turning it off to upgrade.

 

After Upgrade

In IIS you will wan to move the website to a new application pool that is running .net 3.5 or 4.0 Integrated. You cannot share application pools with earlier DNN versions that run on .net 2.0.

Jump into the HOST settings, and configure things like, friendly URL’s, DNN Host Menu Options, and performance settings.

If you disabled bindings (from the initial steps 5 above) re-enable them and test access.

 

DotNetNuke Upgrade Service and Support

We offer a DotNetNuke Support Service that can include the upgrading of DNN websites for you. This is especially useful if you are not confident with either .net websites or IIS server administration.

We are happy to help you evaluate the upgrade path and potential problems. The cost of the service is in effect calculated at at an hourly estimate. It should be noted that if everything goes well, and trouble free, there there is at least 1 hours work in this upgrade, usually more as there are often little bugs to sort out.

Please contact us for support here: http://www.interactivewebs.com/Services/DotNetNukeSupport.aspx

Additional References

http://www.datasprings.com/resources/articles-information/dotnetnuke-articles/upgrading-dotnetnuke-4.9-to-dotnetnuke-6.0

DotNetNuke 6 running in .Net 4.0 Server Error in ‘/’ Application Version=3.5.0.0 Version=4.0.0.0

image

We had a requirement today to run a DotNetNuke Website in .Net 4.0 as some code we are using as part of the Microsoft CRM 2011 SDK require .Net 4.0.

Problem is that with many of the DotNetNuke websites, they have some references that will cause this error when you flip your website worker process to 4.0. in IIS.

image

This will give you an error that looks like this:

 

image

Generates an error:

Server Error in ‘/’ Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1703: An assembly with the same identity ‘System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ has already been imported. Try removing one of the duplicate references.
Source Error:

[No relevant source lines]

Source File: Line: 0

Show Detailed Compiler Output:

 

Interestingly too the reference to Version=4.0.0.0 initially said Version-3.5.0.0 until the second page refresh on the error.

The Problem

The problem in our case, and it may differ with others, related to an older file for Microsoft Ajax.

There is a file called: System.Web.Extensions.dll

in the \bin    folder.

We renamed this to: System.Web.Extensions.dll.bak

And our problem was fixed.

This is due to an older way that Microsoft handled Ajax vs the new way in .Net 4.0.

 

DotNetNuke Support Services

We do offer DotNetNuke support services and would be happy to assist others with this or other DNN problems that need professional support services with.

http://www.interactivewebs.com/Services/DotNetNukeSupport.aspx

Why use flash anymore?

image

The net is changing fast. Release of the iPad and other mobile devices that have correctly made the decision to discontinue Adobe Flash.

I say correct decision because not only is flash yesterdays technology, but it is far from the optimal way to produce simple motion in web pages.

Flash still has it’s place, just not as a way to inject interesting motion into websites.

So what do we use on http://www.InteractiveWebs.com home page?

We have some simple code that renders motion:

<div class="slideshow">
<div class="slide">
<div class="inblock_first">
<div class="wsc_image_frame">
<div class="wsc_frame_tl">
<div class="wsc_frame_tr">
<div class="wsc_frame_tc">
</div>
</div>
</div>
<div class="wsc_frame_cl">
<div class="wsc_frame_cr">
<div class="wsc_frame_cc">
<img alt="" src="/Portals/0/banners/slide2.jpg" />
</div>
</div>
</div>
<div class="wsc_frame_bl">
<div class="wsc_frame_br">
<div class="wsc_frame_bc">
</div>
</div>
</div>
</div>
</div>
<div class="inblock_second">
<h1>Have a Business that needs to get a message out?</h1>
<p>InteractiveWebs provides the best of Content Management Systems on our professional hosting services.<br />
Combining DotNetNuke, WordPress Blogs, iPhone Apps, Microsoft CRM &amp; hosted solutions..<br />
<br />
</p>
<a class="button2" href="/Services/Mushroom.aspx"><span><strong>More</strong></span></a>
</div>
<div class="cleaner"></div>
</div>
<div class="slide">
<div class="inblock_second">
<h1>We have a solution… that is perfect…</h1>
<p>We have some&nbsp;increasable solutions with years of experience…</p>
<h4>
We would love to share them!</h4>
<p><br />
</p>
<a class="button2" href="/Services/Mushroom.aspx"><span><strong>More</strong></span></a>
</div>
<div class="inblock_first">
<div class="wsc_image_frame">
<div class="wsc_frame_tl">
<div class="wsc_frame_tr">
<div class="wsc_frame_tc">
</div>
</div>
</div>
<div class="wsc_frame_cl">
<div class="wsc_frame_cr">
<div class="wsc_frame_cc">
<img alt="" src="/Portals/0/banners/slide1.jpg" />
</div>
</div>
</div>
<div class="wsc_frame_bl">
<div class="wsc_frame_br">
<div class="wsc_frame_bc">
</div>
</div>
</div>
</div>
</div>
<div class="cleaner"></div>
</div>
<div class="slide">
<div class="wsc_image_frame">
<div class="wsc_frame_tl">
<div class="wsc_frame_tr">
<div class="wsc_frame_tc">
</div>
</div>
</div>
<div class="wsc_frame_cl">
<div class="wsc_frame_cr">
<div class="wsc_frame_cc">
<img alt="" src="/Portals/0/banners/slide.jpg" />
</div>
</div>
</div>
<div class="wsc_frame_bl">
<div class="wsc_frame_br">
<div class="wsc_frame_bc">
</div>
</div>
</div>
</div>
<div class="cleaner"></div>
</div>
</div>

 

The source references some jQuery effects known as cycle: http://jquery.malsup.com/cycle/

You will see on this page that it uses code in this method:

<!DOCTYPE html>

<html>

<head>

<title>JQuery Cycle Plugin – Basic Demo</title>

<style type="text/css">

.slideshow { height: 232px; width: 232px; margin: auto }

.slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }

</style>

<!– include jQuery library –>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<!– include Cycle plugin –>

<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>

<script type="text/javascript">

$(document).ready(function() {

$(‘.slideshow’).cycle({

fx: ‘fade’ // choose your transition type, ex: fade, scrollUp, shuffle, etc…

});

});

</script>

</head>

<body>

<div class="slideshow">

<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />

<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />

<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />

<img src="http://cloud.github.com/downloads/malsup/cycle/beach4.jpg" width="200" height="200" />

<img src="http://cloud.github.com/downloads/malsup/cycle/beach5.jpg" width="200" height="200" />

</div>

</body>

</html>

 

Producing this page: http://jquery.malsup.com/cycle/basic.htmlimage

Within DotNetNuke

Within DotNetNuke, there are a bunch of module and skins that have this effect built in. We use a skin known as LightHeads (not developed by us) that uses some hard coded references that make the implementation of this effect really simple. As the first block of code above indicates.

We love jQuery and have used it in our Mushroom Image module and our Mushroom Lite Module.

1 2