<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Security</title><link>http://forums.asp.net/25.aspx</link><description>All about ASP.NET security (authentication, authorization, membership, roles, etc.) and the Login controls. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=24&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3277183.aspx</link><pubDate>Mon, 06 Jul 2009 16:18:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3277183</guid><dc:creator>globrite</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3277183.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3277183</wfw:commentRss><description>&lt;p&gt;Hi there&lt;/p&gt;
&lt;p&gt;You set your permissions based on access to the site - therefore your Managers will be able to see content based on their role. You can do this as the other posters have indicated by controlling access to a folder, using the web.config file, you can also control access to content by using the sitemap and indicating what certain roles can do / see.&lt;/p&gt;
&lt;p&gt;But for your question, you will need to test the role based on how they are logging on to your application and then using Roles.IsUserInRole(&amp;quot;Manager&amp;quot;) to change content. &lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;]glo[&lt;/p&gt;
&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;/p&gt;</description></item><item><title>Re: Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3276278.aspx</link><pubDate>Mon, 06 Jul 2009 08:18:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276278</guid><dc:creator>fiorano</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276278.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3276278</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;So,&amp;nbsp; the group of users&amp;nbsp;for my application (eg, I_CONS_Users) as been set up in AD.&amp;nbsp; Are the two roles : Managing_Directors and Managers set up in AD, or, do I do this in the configuration page?&lt;/p&gt;</description></item><item><title>Re: Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3274178.aspx</link><pubDate>Sat, 04 Jul 2009 03:34:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274178</guid><dc:creator>Bobby-Z</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274178.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3274178</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Sorry Above post got screwed up&lt;/p&gt;
&lt;p&gt;&amp;amp;nbsp;&amp;lt;P&amp;gt;you can DENY USERS , or ALLOW USERS / DENY ROLES or ALLOW ROLES* = All users ? = Anonymous users there is also a way to deny users to a specific page &lt;/p&gt;
&lt;p&gt;Yes you can even set the Page Theme and StyleSheetTheme in here to instead of on the page.&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;don&amp;#39;t forget if you do do it on a page by page basis you need the location node with all properties for each page you define, otherwise it works for the whole folder.&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;So use folder levels when designing for security.&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;ie&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;/Admin&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;/Employee&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;/Customer&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;/Applicant&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;Then in your web.config you can just deny all users and allow that role to access that particular folder. &amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;Next to set up roles.&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;First decide what levels of access and types of useres you will have then name your roles&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;next at the top of the &amp;quot;SOLUTIONS EXPLORER&amp;quot; box there is an icon with a planet and hammer&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;this takes you to the configuration page then click security and the create/manage roles&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;after you have created roles, go to manage users and place them into the role you want.&amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;There are other features that use the role system like the LoginView if you need help with this I will post more. &amp;lt;/P&amp;gt;&amp;lt;P&amp;gt;I can also show you how to create a user and assign them a role at the same time if you need.&amp;lt;/P&amp;gt;&lt;/p&gt;</description></item><item><title>Re: Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3274176.aspx</link><pubDate>Sat, 04 Jul 2009 03:31:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274176</guid><dc:creator>Bobby-Z</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274176.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3274176</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The above video will help, but yes you can allow or deny access based upon roles. This is done in a web.config file in the main directory and in each directory you want to limit access to.&lt;/p&gt;
&lt;p&gt;you can create one in each folder by right clicking the folder in solutions view and add a web configuration file&lt;/p&gt;
&lt;p&gt;in the files you can set it up like this&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;&amp;lt;configuration&amp;gt;
    &amp;lt;appSettings/&amp;gt;
    &amp;lt;connectionStrings/&amp;gt;
    &amp;lt;system.web&amp;gt;
         &amp;lt;authorization&amp;gt;
              &amp;lt;deny users=&amp;quot;*&amp;quot;/&amp;gt;
              &amp;lt;allow roles=&amp;quot;Administrator, Applicant&amp;quot;/&amp;gt;
         &amp;lt;/authorization&amp;gt;
    &amp;lt;/system.web&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&amp;nbsp;&lt;p&gt;you can DENY USERS , or ALLOW USERS / DENY ROLES or ALLOW ROLES* = All users ? = Anonymous users there is also a way to deny users to a specific page 

Yes you can even set the Page Theme and StyleSheetTheme in here to instead of on the page.&lt;/p&gt;&lt;p&gt;don&amp;#39;t forget if you do do it on a page by page basis you need the location node with all properties for each page you define, otherwise it works for the whole folder.&lt;/p&gt;&lt;p&gt;So use folder levels when designing for security.&lt;/p&gt;&lt;p&gt;ie&lt;/p&gt;&lt;p&gt;/Admin&lt;/p&gt;&lt;p&gt;/Employee&lt;/p&gt;&lt;p&gt;/Customer&lt;/p&gt;&lt;p&gt;/Applicant&lt;/p&gt;&lt;p&gt;Then in your web.config you can just deny all users and allow that role to access that particular folder. &lt;/p&gt;&lt;p&gt;Next to set up roles.&lt;/p&gt;&lt;p&gt;First decide what levels of access and types of useres you will have then name your roles&lt;/p&gt;&lt;p&gt;next at the top of the &amp;quot;SOLUTIONS EXPLORER&amp;quot; box there is an icon with a planet and hammer&lt;/p&gt;&lt;p&gt;this takes you to the configuration page then click security and the create/manage roles&lt;/p&gt;&lt;p&gt;after you have created roles, go to manage users and place them into the role you want.&lt;/p&gt;&lt;p&gt;There are other features that use the role system like the LoginView if you need help with this I will post more. &lt;/p&gt;&lt;p&gt;I can also show you how to create a user and assign them a role at the same time if you need.&lt;/p&gt;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3274062.aspx</link><pubDate>Fri, 03 Jul 2009 22:24:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274062</guid><dc:creator>pryanjr</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274062.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3274062</wfw:commentRss><description>&lt;p&gt;This link got me going: &lt;a href="http://www.asp.net/learn/3.5-videos/video-45.aspx"&gt;http://www.asp.net/learn/3.5-videos/video-45.aspx&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Currently Using Windows Authentication ....Help with Roles?????</title><link>http://forums.asp.net/thread/3273583.aspx</link><pubDate>Fri, 03 Jul 2009 13:26:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273583</guid><dc:creator>fiorano</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273583.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=3273583</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;HI,&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Im currently using Windows Authentication to allow users access certain areas on my Intranet site.&amp;nbsp; Is it possible to allows these users access to certain content depending on their role.&lt;/p&gt;
&lt;p&gt;I have no experience of using active directory (the user group has been set up in AD by a colleague).&lt;/p&gt;
&lt;p&gt;What I need to do is test the role of the user on the page_load event and make certain content visible/invisible depending on their role.&amp;nbsp; There are two roles : managing_directors and managers.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any advice appreciated!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Fiorano&lt;/p&gt;</description></item></channel></rss>