Hello, I need help to implement a mixed mode authentication in the following situation:
asp.net website under IIS 6.0, webserver win2003 R2, member of AD domain - environment .Net Framework 4.0
What I need is having two sections under same site: one using forms authentication for normal navigation, the other with basic authentication for accessing file resources (basically a shared folder). In
both cases authentication must be against the same AD domain the webserver belongs to. I managed to do this separately splitting website into two separate sites (one with forms authentication and ActiveDirectory
Membership Provider - anonymous access ENABLED, integrated Windows authentication ENABLED - , the other with Basic over SSL: anonymous access DISABLED, in web.config: authentication mode="Windows" ).
Now I would use MADAM to put all together and I think I should use in the madam section of web.config (following MADAM article only anonymous access is enabled in IIS)
But this does not work in the forms authentication: returns in login.aspx invalid credentials; strangely, the Basic authentication works fine. I need to know if it is possible configure MADAM, maybe modifying source - but I need help on this - , to use Active
Directory as credentials store.
Do you means you want to use MADAM as authentication in your project? From the configuration you post, you didn't set MADAM in it. You could install and configure MADAM to an existing asp.net web application by below link, it will help you.
bitmap62
Member
24 Points
6 Posts
MADAM (Mixed authentication and disposition module) and ActiveDirectory MembershipProvider
Jan 20, 2013 08:33 AM|LINK
Hello, I need help to implement a mixed mode authentication in the following situation:
asp.net website under IIS 6.0, webserver win2003 R2, member of AD domain - environment .Net Framework 4.0
What I need is having two sections under same site: one using forms authentication for normal navigation, the other with basic authentication for accessing file resources (basically a shared folder). In both cases authentication must be against the same AD domain the webserver belongs to. I managed to do this separately splitting website into two separate sites (one with forms authentication and ActiveDirectory Membership Provider - anonymous access ENABLED, integrated Windows authentication ENABLED - , the other with Basic over SSL: anonymous access DISABLED, in web.config: authentication mode="Windows" ).
Now I would use MADAM to put all together and I think I should use in the madam section of web.config (following MADAM article only anonymous access is enabled in IIS)
<userSecurityAuthority realm="mycompany.com" provider="MembershipUserSecurityAuthority" membershipProvider="AspNetActiveDirectoryMembershipProvider" exposeClearTextPassword="false "/>and in the relevant sections of web.config:
<connectionStrings> <add name="ADService" connectionString="LDAP://255.255.255.255/DC=mycompany,DC=com" /> </connectionStrings> <authentication mode="Forms"> <forms loginUrl="~/login.aspx"> <!-- <credentials passwordFormat="Clear"> <user name="johndoe" password="secret"/> </credentials> --> </forms> </authentication> <membership defaultProvider="AspNetActiveDirectoryMembershipProvider"> <providers> <clear /> <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADService" attributeMapUsername="sAMAccountName" /> </providers> </membership>But this does not work in the forms authentication: returns in login.aspx invalid credentials; strangely, the Basic authentication works fine. I need to know if it is possible configure MADAM, maybe modifying source - but I need help on this - , to use Active Directory as credentials store.
Thank you very much, any help is appreciated.
Chen Yu - MS...
All-Star
21584 Points
2493 Posts
Microsoft
Re: MADAM (Mixed authentication and disposition module) and ActiveDirectory MembershipProvider
Jan 24, 2013 09:22 AM|LINK
Hi,
Do you means you want to use MADAM as authentication in your project? From the configuration you post, you didn't set MADAM in it. You could install and configure MADAM to an existing asp.net web application by below link, it will help you.
Please see: http://msdn.microsoft.com/en-us/library/aa479391.aspx
Best Regards,
Feedback to us
Develop and promote your apps in Windows Store
bitmap62
Member
24 Points
6 Posts
Re: MADAM (Mixed authentication and disposition module) and ActiveDirectory MembershipProvider
Jan 24, 2013 08:05 PM|LINK
Thank you very much.
Best regards.