Error on GetSkin() loading a DotNetNuke website

Trying to load a DotNetNuke website, I was getting an error on Default.aspx page in this specific line:

Server Error in ‘/’ Application.

Object reference not set to an instance of an object

Description: An unhandled exception occurred during the execution of the current web request. Please review the  stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

ctlSkin = IsPopUp ? UI.Skins.Skin.GetPopUpSkin(this) : UI.Skins.Skin.GetSkin(this); 

(Line 666, coincidence? Eheh)

The error was related to DNNMenu web user control, saying that couldn’t found the .ascx file.

After struggling a bit, I’ve found my DesktopModules folder was being considered as a Virtual Directory on IIS and pointing to a wrong path. So after fixing, pointing out to the right path, everything was working again 🙂