|
|
|
Joined: 2/7/2004
Posts: 36
|
|
|
Thanks, Darren,
It works fine with AD, further more, I tested it in a machine without AD, it failed, so I changed AddUser stored procedure as following, it works fine for window authentication without active directory.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AddUser]
@PortalID int,
@Username nvarchar(100),
@FirstName nvarchar(50),
@LastName nvarchar(50),
@AffiliateId int,
@IsSuperUser bit,
@Email nvarchar(256),
@DisplayName nvarchar(100),
@UpdatePassword bit,
@Authorised bit
AS
DECLARE @UserID int
SELECT @UserID = UserID
FROM Users
WHERE Username = @Username
-- begin adding firstname, lastname, displayname if null
IF ( @FirstName is null OR @FirstName = '' )
BEGIN
SET @FirstName = @Username
END
IF ( @LastName is null OR @LastName = '' )
BEGIN
SET @LastName = @Username
END
IF ( @DisplayName is null OR @DisplayName = '' )
BEGIN
SET @DisplayName = @Username
END
-- end of adding
IF @UserID is null
BEGIN
INSERT INTO Users (
Username ,
FirstName ,
LastName ,
AffiliateId ,
IsSuperUser ,
Email ,
DisplayName ,
UpdatePassword
)
VALUES (
@Username ,
@FirstName ,
@LastName ,
@AffiliateId ,
@IsSuperUser ,
@Email ,
@DisplayName ,
@UpdatePassword
)
SELECT @UserID = SCOPE_IDENTITY()
END
IF @IsSuperUser = 0
BEGIN
IF not exists ( SELECT 1 FROM UserPortals WHERE UserID = @UserID AND PortalID = @PortalID )
BEGIN
INSERT INTO UserPortals (
UserID ,
PortalID ,
Authorised
)
VALUES (
@UserID ,
@PortalID ,
@Authorised
)
END
END
SELECT @UserID
|
|
|
|
| |
|
|
Joined: 8/8/2004
Posts: 11
|
|
|
mcalder wrote
. All it does is make thousands (yes, thousands) for SQL calls to GetUserByUserName. Eventually the user sees nothing is happening and goes away. I think that may be the only thing preventing from these calls going on forever.
I am not an expert... but I got all this to work today thanks to all kinds of posts like this...
In my experience, The "looping" effect was solved by uncommenting the following line in <httpModules> section of Web.config
<add name="Authentication" type="DotNetNuke.HttpModules.AuthenticationModule, DotNetNuke.HttpModules.Authentication" />
The "Forms" vs. "Windows" authentication methods shown below only controlled whether a "mixed" mode of login styles (forms) or an auto-login style (windows) was in operation on my dnn site. By switching to "forms" the problem appeared to go away, but I think that was only because it was not trying to "auto-login" with a non-functional configuration...
<authentication mode="Forms"> <forms name=".DOTNETNUKE" protection="All" timeout="60" cookieless="UseCookies"/>
</authentication> <!-- <identity impersonate="true"/> <authentication mode="Windows"> </authentication> -->
Hope it helps someone...
|
|
|
|
| |
|
|
Joined: 2/13/2006
Posts: 3
|
|
|
wpetersen wrote
mcalder wrote
. All it does is make thousands (yes, thousands) for SQL calls to GetUserByUserName. Eventually the user sees nothing is happening and goes away. I think that may be the only thing preventing from these calls going on forever.
|
I am not an expert... but I got all this to work today thanks to all kinds of posts like this...
In my experience, The "looping" effect was solved by uncommenting the following line in section of Web.config
I'm not an expert too, but I'm in the same "loop" situation as mcalder and I had tried all posted ideas of configuration, no luck.
Uncommenting the DotNetNuke.HttpModules.AuthenticationModule and using Forms authentication method doesn't make any sense to me, except that you really get rid of the loops but you also loose the auto-login and creation of the user. After that how do you login and what's the use of Windows authentication when the user have to login again in case using dnn as intranet portal and AD.
I hope, someone with working AD authentication on dnn 4.3.3 or 4.3.4 will finally post some details on configuration. Or there is no such thing.
|
|
|
|
| |
|
|
Joined: 9/2/2006
Posts: 2
|
|
|
We're looking to set up DotNuke on our school intranet, so Active Directory Authentication and cross grouping Roles to groups is *very* important.
I've spent a couple of hours working on getting windows authentication up and running. Results, can get the 3.3.5 working fine, can't get the 4.3.5 working properly. V4 partially works with windows authentication ..... sometimes [maybe earlier or pre existing cookies are causing variations?). but certainly can't get V4 working reliably. Doesn't seem to want to auto create/register users.
I'm looking for some confirmation that v4 *can* work reliably before moving to Net2, and through trawling through the forum I can't find any confirmation of this...
Can anyone confirm that they have v$ working properly with authentication via AD?
Also, BTW, thanks to the contributors for providing the fix to the add user stored procedure. Appreciated!
Cheers!
|
|
|
|
| |
|
|
Joined: 9/2/2006
Posts: 2
|
|
|
DDEN wrote
We're looking to set up DotNuke on our school intranet, so Active Directory Authentication and cross grouping Roles to groups is *very* important.
I've spent a couple of hours working on getting windows authentication up and running. Results, can get the 3.3.5 working fine, can't get the 4.3.5 working properly. V4 partially works with windows authentication ..... [snip] Can anyone confirm that they have v4 working properly with authentication via AD?
Self Follow up...
Through trawling the forum, I've now learnt that my variable results were caused by 'experimenting' with DotNet while using a parent/child portal. I.E. on my test setup, I immediately created a child portal, then set up AD authentication to 'test' this. I now realise that many of the failures I noted were as result of an issue with authentication across portals. AD authentication seems to work fine if you use it with just one portal, and don't try to have users rove between portals using AD authentication.
I also note this issue is being 'looked at', needing to explore ways to 'get around' underlying NET architecture. Can I add my appreciation to those working on this, certainly be a useful feature for us. [School intranet, with Classes being set up in child portals].
Cheers!
|
|
|
|
| |