Reset DotNetNuke windows authentication back to normal.

In my previous posts (here and here)  I described the problems that I had to implemented mixed Authentication for DotNetNuke.
Important step for administrator is “Before switching to Windows Authentication ensure that your LAN acoount has host/administrative permissions for the portal.”.

If it wasn’t done, you can’t access administrative features. It is possible to use SQL command to re- activated Windows Authentication.

I am using call to SP  ModuleSettings_SiteSettings_Save that I’ve created previously.

exec dnn_ModuleSettings_SiteSettings_Save ‘WindowsAuthentication’,’false’

Note that DNN admin SQL page is not available and administrator should use some other SQL client to access your DNN database.

 SP ModuleSettings_SiteSettings_Save is the following:

CREATE PROCEDURE {databaseOwner}.[{objectQualifier}ModuleSettings_SiteSettings_Save]

      — Add the parameters for the stored procedure here

      @SettingName nvarchar(50),

      @SettingValue nvarchar(2000)




declare @SiteSettingsModuleId int

select @SiteSettingsModuleId={objectQualifier}Modules.ModuleID

FROM    dnn_Modules  INNER JOIN

                      {databaseOwner}dnn_ModuleDefinitions ON {objectQualifier}Modules.ModuleDefID = {objectQualifier}ModuleDefinitions.ModuleDefID INNER JOIN

                      {databaseOwner}dnn_DesktopModules ON {objectQualifier}ModuleDefinitions.DesktopModuleID = {objectQualifier}DesktopModules.DesktopModuleID

WHERE     ({objectQualifier}DesktopModules.FriendlyName = N’Site Settings’)


if NOT exists (select * from dbo.{objectQualifier}ModuleSettings WHERE  ({objectQualifier}ModuleSettings.SettingName = @SettingName) AND {objectQualifier}ModuleSettings.ModuleID =@SiteSettingsModuleId )

      INSERT INTO   {objectQualifier}ModuleSettings (ModuleID,SettingName,SettingValue)



      update    {objectQualifier}ModuleSettings

      set SettingValue=@SettingValue

      FROM         {objectQualifier}ModuleSettings

      WHERE     ({objectQualifier}ModuleSettings.SettingName = @SettingName) AND  {objectQualifier}ModuleSettings.ModuleID =@SiteSettingsModuleId