<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ASP.NET MVC Using Forms Authentication With LDAP</title>
	<atom:link href="http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/</link>
	<description>Web Design, Programming, Tutorials</description>
	<lastBuildDate>Tue, 13 Dec 2011 14:46:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Chris Jackson</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-11913</link>
		<dc:creator>Chris Jackson</dc:creator>
		<pubDate>Tue, 13 Dec 2011 14:46:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-11913</guid>
		<description>@Daniel Ma:
In the AppSettings of the Web.Config, you need to add a key/value pair for that setting...something like:

&lt;appSettings&gt;
  &lt;add key=&quot;LDAPServer&quot; value=&quot;yourdomain.com&quot; /&gt;
&lt;/appSettings&gt;</description>
		<content:encoded><![CDATA[<p>@Daniel Ma:<br />
In the AppSettings of the Web.Config, you need to add a key/value pair for that setting&#8230;something like:</p>
<p>&lt;appSettings&gt;<br />
  &lt;add key=&#8221;LDAPServer&#8221; value=&#8221;yourdomain.com&#8221; /&gt;<br />
&lt;/appSettings&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Ma</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-11611</link>
		<dc:creator>Daniel Ma</dc:creator>
		<pubDate>Fri, 09 Dec 2011 03:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-11611</guid>
		<description>Sorry but i&#039;m missing something, 
_userRepository = New UserRepository(ConfigurationManager.AppSettings(&quot;LDAPServer&quot;)
How to set LDAPServer config in web.config?</description>
		<content:encoded><![CDATA[<p>Sorry but i&#8217;m missing something,<br />
_userRepository = New UserRepository(ConfigurationManager.AppSettings(&#8220;LDAPServer&#8221;)<br />
How to set LDAPServer config in web.config?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jackson</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-8160</link>
		<dc:creator>Chris Jackson</dc:creator>
		<pubDate>Tue, 16 Aug 2011 19:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-8160</guid>
		<description>@Carlos
This example was written with MVC 1, but it should work still in MVC 3 using the Razor views.  The view shouldn&#039;t matter as far as the example goes, your field names in HTML will need to match the parameter names being passed into the Logon POST method...

userName, password, rememberMe, and returnUrl.

...if your field names match the parameter names (if you manually type the HTML fields), MVC will bind them for you. You could also create the Razor view with a class like User and then pass a user object into your Logon POST method, but you would have to add the additional properties for returnUrl and rememberMe.</description>
		<content:encoded><![CDATA[<p>@Carlos<br />
This example was written with MVC 1, but it should work still in MVC 3 using the Razor views.  The view shouldn&#8217;t matter as far as the example goes, your field names in HTML will need to match the parameter names being passed into the Logon POST method&#8230;</p>
<p>userName, password, rememberMe, and returnUrl.</p>
<p>&#8230;if your field names match the parameter names (if you manually type the HTML fields), MVC will bind them for you. You could also create the Razor view with a class like User and then pass a user object into your Logon POST method, but you would have to add the additional properties for returnUrl and rememberMe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-8158</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Tue, 16 Aug 2011 18:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-8158</guid>
		<description>How to add a view &quot;login&quot; with &quot;razor&quot; and what class would be:

User, or FormsAut UserRepository ..

Thanks
GREETINGS FROM MÉXICO</description>
		<content:encoded><![CDATA[<p>How to add a view &#8220;login&#8221; with &#8220;razor&#8221; and what class would be:</p>
<p>User, or FormsAut UserRepository ..</p>
<p>Thanks<br />
GREETINGS FROM MÉXICO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jackson</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-8044</link>
		<dc:creator>Chris Jackson</dc:creator>
		<pubDate>Thu, 04 Aug 2011 14:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-8044</guid>
		<description>@Hugh
Yep, sometimes you work in the languages dictated by your company and the others you work with. We have since moved on to use C# and it is much nicer, but I don&#039;t look down on those who use VB because sometimes you don&#039;t have a choice.</description>
		<content:encoded><![CDATA[<p>@Hugh<br />
Yep, sometimes you work in the languages dictated by your company and the others you work with. We have since moved on to use C# and it is much nicer, but I don&#8217;t look down on those who use VB because sometimes you don&#8217;t have a choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugh</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-7459</link>
		<dc:creator>Hugh</dc:creator>
		<pubDate>Thu, 23 Jun 2011 19:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-7459</guid>
		<description>Visual Basic, really?</description>
		<content:encoded><![CDATA[<p>Visual Basic, really?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arnold Smith</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-3902</link>
		<dc:creator>Arnold Smith</dc:creator>
		<pubDate>Thu, 20 Jan 2011 05:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-3902</guid>
		<description>Nice article. Thanks!</description>
		<content:encoded><![CDATA[<p>Nice article. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lyle</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-2665</link>
		<dc:creator>Lyle</dc:creator>
		<pubDate>Tue, 02 Nov 2010 04:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-2665</guid>
		<description>Hey Chris! Good article, nice site.  If there is a way you could let JeffKirby know that I would love to see his C# code I&#039;d really appreciate it!</description>
		<content:encoded><![CDATA[<p>Hey Chris! Good article, nice site.  If there is a way you could let JeffKirby know that I would love to see his C# code I&#8217;d really appreciate it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jackson</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-2129</link>
		<dc:creator>Chris Jackson</dc:creator>
		<pubDate>Mon, 07 Jun 2010 16:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-2129</guid>
		<description>@JeffKirby
The Authorize attribute should work because the code in the global.asax is creating a new GenericPrincipal using the list of groups stored in the cookie and then passing it into the user context.

The group names should match those you create in Active Directory.  I have noticed that the built-in groups do not show in this list.  I have had to use my own custom groups. 

If there are spaces in the group names, that may be the problem. Maybe the IsInRole trims the group passed into it and the Authorize atribute does not? Not sure.

If you found another way that you prefer, that&#039;s great!  The nice thing about programming is there&#039;s about a million ways to do something and you get to be creative in coming up with your answer.</description>
		<content:encoded><![CDATA[<p>@JeffKirby<br />
The Authorize attribute should work because the code in the global.asax is creating a new GenericPrincipal using the list of groups stored in the cookie and then passing it into the user context.</p>
<p>The group names should match those you create in Active Directory.  I have noticed that the built-in groups do not show in this list.  I have had to use my own custom groups. </p>
<p>If there are spaces in the group names, that may be the problem. Maybe the IsInRole trims the group passed into it and the Authorize atribute does not? Not sure.</p>
<p>If you found another way that you prefer, that&#8217;s great!  The nice thing about programming is there&#8217;s about a million ways to do something and you get to be creative in coming up with your answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JeffKirby</title>
		<link>http://www.cmjackson.net/2009/10/23/asp-net-mvc-using-forms-authentication-with-ldap/comment-page-1/#comment-2125</link>
		<dc:creator>JeffKirby</dc:creator>
		<pubDate>Mon, 07 Jun 2010 01:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.cmjackson.net/?p=262#comment-2125</guid>
		<description>I should also mention that negates the need to mess with the user context at all.</description>
		<content:encoded><![CDATA[<p>I should also mention that negates the need to mess with the user context at all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

