<?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: Authorisation problem</title><link>http://forums.asp.net/thread/2365004.aspx</link><pubDate>Mon, 19 May 2008 03:07:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2365004</guid><dc:creator>XiaoYong Dai – MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2365004.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=2365004</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;Suan Ngaihte:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; got the login/authorisation problem but my friends does not get. This made me suspect that there is some problem in my OS settings related to web application (IIS, ASP.Net and related applications).&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you enabled &amp;quot;automatic logon with current username and password&amp;quot;? It will automaticly send current credential to IIS for authentication&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Steps for Internet Explorer: Tools&amp;gt;Internet Options&amp;gt;Security&amp;gt;choose&amp;nbsp;Security Zone&amp;gt;Custom level&amp;gt;User Authenticationto &amp;quot;automatic logon with current username and password&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: Authorisation problem</title><link>http://forums.asp.net/thread/2363734.aspx</link><pubDate>Sat, 17 May 2008 10:41:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2363734</guid><dc:creator>Suan Ngaihte</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2363734.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=2363734</wfw:commentRss><description>&lt;p&gt;Dear,&lt;br /&gt;&lt;br /&gt;Actually I am using Windows XP - SP2 .&amp;nbsp; My friends who are working on the same project using the same settings with same OS does not have any problem by disabling Anonymous user from their IIS settings. The problem is that when I change my IIS settings exactly same with my friends&amp;#39; settings I got the login/authorisation problem but my friends does not get. This made me suspect that there is some problem in my OS settings related to web application (IIS, ASP.Net and related applications).&lt;br /&gt;&lt;br /&gt;We do not wanted to use form authentication or something else, what we want is to disable &amp;quot;Anonymous&amp;quot; user, enable &amp;quot;Integrated Windows Authentication&amp;quot; and able to open the page without any prompt for Username and Password. Below is our piece of code which will retrieve username&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;b id="1"&gt;1    &lt;/b&gt;&lt;span class="kwd"&gt;public static string&lt;/span&gt; GetCurrentUsername() 
&lt;b id="2"&gt;2    &lt;/b&gt;{
&lt;b id="3"&gt;3    &lt;/b&gt;	&lt;span class="kwd"&gt;string&lt;/span&gt; user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;&lt;span class="cmt"&gt;//It does not assign value to variable user
&lt;b id="4"&gt;4    &lt;/b&gt;	//string user = HttpContext.Current.Request.ServerVariables[&amp;quot;LOGON_USER&amp;quot;];//This does not work either&lt;/span&gt;
&lt;b id="5"&gt;5    &lt;/b&gt;	&lt;span class="kwd"&gt;int&lt;/span&gt; domainIndex = user.IndexOf(@&lt;span class="st"&gt;&amp;quot;\&amp;quot;&lt;/span&gt;);
&lt;b id="6"&gt;6    &lt;/b&gt;	&lt;span class="kwd"&gt;if&lt;/span&gt; (domainIndex != -1)
&lt;b id="7"&gt;7    &lt;/b&gt;		&lt;span class="kwd"&gt;return&lt;/span&gt; user.Substring(domainIndex + 1);
&lt;b id="8"&gt;8    &lt;/b&gt;	&lt;span class="kwd"&gt;return&lt;/span&gt; user;
&lt;b id="9"&gt;9    &lt;/b&gt;}&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;I badly need help, what can i do, please friends help me.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;</description></item><item><title>Re: Authorisation problem</title><link>http://forums.asp.net/thread/2361323.aspx</link><pubDate>Fri, 16 May 2008 03:53:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2361323</guid><dc:creator>XiaoYong Dai – MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2361323.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=2361323</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please&amp;nbsp;verify the authentication mode in your web.config, By default it&amp;#39;s windows authentication. You may need to change it like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;lt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;forms loginUrl=&amp;quot;&lt;a href="https://localhost/login.aspx%22%3E%3C/forms"&gt;login.aspx&amp;quot;&amp;gt;&amp;lt;/forms&lt;/a&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/authentication&amp;gt;&lt;/p&gt;</description></item><item><title>Authorisation problem</title><link>http://forums.asp.net/thread/2356471.aspx</link><pubDate>Wed, 14 May 2008 07:59:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2356471</guid><dc:creator>Suan Ngaihte</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2356471.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=2356471</wfw:commentRss><description>&lt;p&gt;Hi All, I do not know much about ASP.Net and IIS authorisation and authentication, the problem I am facing is like this, whenever I disabled the Anonymous Acces in IIS (Windows XP and .Net 2.0) and run my application it always prompt me to enter username and password with windows login dialog, when I enter my windows username and password and click on login it does not accept and when i continously click for 4 times the page displays to me that I am not authorised to view the page. and when I enabled that feature, I got a different error message&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Need help please.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>