pramod.bhagat
2010-01-19T15:04:38Z
Hi,

I have implemented YAF forum on the public website (http://www.barkingdagenham.nhs.uk/listening-to-you/what-do-you-think.aspx) in the form of Immediacy standard plugin which works fine.

I am trying to implement the same on intranet site which also has Active Directory implemented but it seems to create a problem.

Forum as a stand alone by removing settings in web.config for Active Directory works fine where as removing settings for forum, Active Directory works fine.
Both of them work fine independently but when I try to have both of them on the same site it creates a problem. I get below error when I try to run the forum module:

Server Error in '/' Application.


Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username
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.ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username]
System.Web.Security.ActiveDirectoryMembershipProvider.CheckUserName(String& username, Int32 maxSize, String paramName) +1920233
System.Web.Security.ActiveDirectoryMembershipProvider.GetUser(String username, Boolean userIsOnline) +86
System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +82
System.Web.Security.Membership.GetUser() +19
YAF.Classes.Base.ForumPage.xec949a1107be2d2f() +31
YAF.Classes.Base.ForumPage.xc4ef1e75fc721fb8(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +1937
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
System.Web.UI.ControlCollection.Add(Control child) +80
YAF.Forum.x971992b5c4066ec0(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +341
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
System.Web.UI.ControlCollection.Add(Control child) +80
CMS.Plugins.Forum.Controls.Forum.CreateChildControls() +81
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

The web.config settings for forum is:
<authentication mode="Forms">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
This uses authentication mode as forms where as Active Directory its windows and the settings for Active Directory is :
<authentication mode="Windows">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
<identity impersonate="false"></identity>
<authorization>
<deny users="?" />
</authorization>
Also we need to set windows authentication in IIS as its uses Active Directory.

It looks like the forum is looking for logged in user in membership database.

Is there a way to have YAF forum implemented with windows authentication rather than with forms so that it works along with Active Directory?

I am using .Net 3.5 and Immediacy6.1

Thanks for your help.

Thanks,
Pramod Bhagat
Sponsor
insdvm00
2010-10-20T11:20:18Z
pramod.bhagat wrote:

Hi,

I have implemented YAF forum on the public website (http://www.barkingdagenham.nhs.uk/listening-to-you/what-do-you-think.aspx) in the form of Immediacy standard plugin which works fine.

I am trying to implement the same on intranet site which also has Active Directory implemented but it seems to create a problem.

Forum as a stand alone by removing settings in web.config for Active Directory works fine where as removing settings for forum, Active Directory works fine.
Both of them work fine independently but when I try to have both of them on the same site it creates a problem. I get below error when I try to run the forum module:

Server Error in '/' Application.



Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username
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.ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username]
System.Web.Security.ActiveDirectoryMembershipProvider.CheckUserName(String& username, Int32 maxSize, String paramName) +1920233
System.Web.Security.ActiveDirectoryMembershipProvider.GetUser(String username, Boolean userIsOnline) +86
System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +82
System.Web.Security.Membership.GetUser() +19
YAF.Classes.Base.ForumPage.xec949a1107be2d2f() +31
YAF.Classes.Base.ForumPage.xc4ef1e75fc721fb8(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +1937
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
System.Web.UI.ControlCollection.Add(Control child) +80
YAF.Forum.x971992b5c4066ec0(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +341
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
System.Web.UI.ControlCollection.Add(Control child) +80
CMS.Plugins.Forum.Controls.Forum.CreateChildControls() +81
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

The web.config settings for forum is:
<authentication mode="Forms">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
This uses authentication mode as forms where as Active Directory its windows and the settings for Active Directory is :
<authentication mode="Windows">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
<identity impersonate="false"></identity>
<authorization>
<deny users="?" />
</authorization>
Also we need to set windows authentication in IIS as its uses Active Directory.

It looks like the forum is looking for logged in user in membership database.

Is there a way to have YAF forum implemented with windows authentication rather than with forms so that it works along with Active Directory?

I am using .Net 3.5 and Immediacy6.1

Thanks for your help.

Thanks,
Pramod Bhagat







Hello!

I´m interested in this issue, but i don´t know how to do it. Is your Ative- directory working?
Can you tell me what I have to do for it?

thanks in advance,

Damián.
rickjackson
2011-06-21T09:21:01Z
Originally Posted by: pramod.bhagat 

Hi,

I have implemented YAF forum on the public website (http://www.barkingdagenham.nhs.uk/listening-to-you/what-do-you-think.aspx) in the form of Immediacy standard plugin which works fine.

I am trying to implement the same on intranet site which also has Active Directory implemented but it seems to create a problem.

Forum as a stand alone by removing settings in web.config for Active Directory works fine where as removing settings for forum, Active Directory works fine.
Both of them work fine independently but when I try to have both of them on the same site it creates a problem. I get below error when I try to run the forum module:

Server Error in '/' Application.



Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username
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.ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentException: Usernames must not contain '\' when mapped to 'userPrincipalName'.
Parameter name: username]
System.Web.Security.ActiveDirectoryMembershipProvider.CheckUserName(String& username, Int32 maxSize, String paramName) +1920233
System.Web.Security.ActiveDirectoryMembershipProvider.GetUser(String username, Boolean userIsOnline) +86
System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +82
System.Web.Security.Membership.GetUser() +19
YAF.Classes.Base.ForumPage.xec949a1107be2d2f() +31
YAF.Classes.Base.ForumPage.xc4ef1e75fc721fb8(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +1937
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
System.Web.UI.ControlCollection.Add(Control child) +80
YAF.Forum.x971992b5c4066ec0(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) +341
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
System.Web.UI.ControlCollection.Add(Control child) +80
CMS.Plugins.Forum.Controls.Forum.CreateChildControls() +81
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

The web.config settings for forum is:
<authentication mode="Forms">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
This uses authentication mode as forms where as Active Directory its windows and the settings for Active Directory is :
<authentication mode="Windows">
<forms name=".IMMAUTH" loginUrl="/footer/logon.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true">
</forms>
</authentication>
<identity impersonate="false"></identity>
<authorization>
<deny users="?" />
</authorization>
Also we need to set windows authentication in IIS as its uses Active Directory.

It looks like the forum is looking for logged in user in membership database.

Is there a way to have YAF forum implemented with windows authentication rather than with forms so that it works along with Active Directory?

I am using .Net 3.5 and Immediacy6.1

Thanks for your help.

Thanks,
Pramod Bhagat



Hello Pramod, have you found solution to your problem..... please post step by step instructions for implementing ActiveDirectory login into our YAF.NET Application.

regards,

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved