Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com

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)

AS

BEGIN

 

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)

      values(@SiteSettingsModuleId,@SettingName,@SettingValue)   

else

      update    {objectQualifier}ModuleSettings

      set SettingValue=@SettingValue

      FROM         {objectQualifier}ModuleSettings

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

END

 

go

 

Posted on Tuesday, May 16, 2006 9:42 AM DotNetNuke | Back to top


Comments on this post: Reset DotNetNuke windows authentication back to normal.

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net