<?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: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1669871.aspx</link><pubDate>Tue, 17 Apr 2007 21:29:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1669871</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1669871.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1669871</wfw:commentRss><description>No answer for it guys???</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1669870.aspx</link><pubDate>Tue, 17 Apr 2007 21:27:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1669870</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1669870.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1669870</wfw:commentRss><description>No answer for it guys???</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1664772.aspx</link><pubDate>Fri, 13 Apr 2007 15:34:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1664772</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1664772.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1664772</wfw:commentRss><description>&lt;p&gt;Hi guys... back to this topic after long time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; as per me i tried all different way. my final conclusion is as below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; In my intranet website i have created a different hierarchy( kind of folders inside folders). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;for example project -&amp;gt; Images -&amp;gt; HRImages&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; project -&amp;gt; Images -&amp;gt; ITImages etc....&lt;/p&gt;
&lt;p&gt;as well as the same kind of folder hierarchy for web forms too...&lt;/p&gt;
&lt;p&gt;like&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; project-&amp;gt; welcome.aspx&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; project -&amp;gt; HR -&amp;gt; welcome.aspx, (All HR pages).aspx&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;project -&amp;gt; HR -&amp;gt; welcome.aspx, (All&amp;nbsp;IT pages).aspx&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; and I have just one web.config for whole project, as per me i think that is what causing problem for poping up at client machine for authentication for each folder. so may be i have to put web.config in each and every folder( and that's weired.)... is there any one has any better idea for this kind of hierarchical project management... without adding bunch of web.config for each folder...... i m pointing to something like (site map.-- i m not sure whether it helps of not.)&lt;/p&gt;
&lt;p&gt;please reply&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1663575.aspx</link><pubDate>Thu, 12 Apr 2007 20:51:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1663575</guid><dc:creator>andiisuper</dc:creator><author>andiisuper</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1663575.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1663575</wfw:commentRss><description>&lt;div class=ForumPostContentText id=ctl00_ctl01_bcr_ctl00___PostRepeater_ctl02_PostViewWrapper&gt;
&lt;p&gt;I've got the same problem for my intranet Application.&lt;/p&gt;
&lt;p&gt;Everyone have encounter the same problem about nothing having User.Identity.Name updated. I believed that the Web.Config should always have something like these here &lt;/p&gt;&lt;font color=#0000ff&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000&gt;authentication&lt;/font&gt;&lt;font color=#0000ff&gt; &lt;/font&gt;&lt;font color=#ff0000&gt;mode&lt;/font&gt;&lt;font color=#0000ff&gt;=&lt;/font&gt;"&lt;font color=#0000ff&gt;Windows&lt;/font&gt;"&lt;font color=#0000ff&gt;/&amp;gt;&lt;/font&gt; 
&lt;p&gt;&lt;font color=#0000ff&gt;&lt;/font&gt;&lt;/p&gt;&amp;lt;&lt;font color=#800000&gt;authorization&lt;/font&gt;&lt;font color=#0000ff&gt;&amp;gt; 
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000&gt;deny&lt;/font&gt;&lt;font color=#0000ff&gt; &lt;/font&gt;&lt;font color=#ff0000&gt;users&lt;/font&gt;&lt;font color=#0000ff&gt;=&lt;/font&gt;"&lt;font color=#0000ff&gt;?&lt;/font&gt;"&lt;font color=#0000ff&gt; /&amp;gt; 
&lt;p&gt;&amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000&gt;authorization&lt;/font&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt; 
&lt;p&gt;&amp;nbsp;Also make sure you have Authentication Methods of your Virtual directory checked with Integrated Window Authentication.&lt;/p&gt;
&lt;p&gt;One more thing, make sure your browser support windown authentication by go to Menu -&amp;gt; Tools -&amp;gt; Internet Options -&amp;gt; Advanced -&amp;gt; Security -&amp;gt; check Enabled Integrated Windown Authentication.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This works perfectly for me with 95% of my end user in my company, there there's some other user whose still get the pop up window message.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I believe that this is not about the code, it's about your server security setup which I missed somewhere. &lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;&lt;font color=#000000&gt;WHOEVER ENCOUNTERED THIS AND GOT IT FIX, PLEASE POST IT UP TO HELP US WHO ARE IN FRUSTRATION WITH THIS.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;&lt;font color=#000000&gt;Thanks Guys&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1663565.aspx</link><pubDate>Thu, 12 Apr 2007 20:47:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1663565</guid><dc:creator>andiisuper</dc:creator><author>andiisuper</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1663565.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1663565</wfw:commentRss><description>&lt;p&gt;I've got the same problem for my intranet Application.&lt;/p&gt;
&lt;p&gt;Everyone have encounter the same problem about nothing having User.Identity.Name updated. I believed that the Web.Config should always have something like these here &lt;/p&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authentication&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;mode&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Windows&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&lt;/font&gt;&lt;/p&gt;&amp;lt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt; 
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;deny&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;users&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;?&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;
&lt;p&gt;&amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;Also make sure you have Authentication Methods of your Virtual directory checked with Integrated Window Authentication.&lt;/p&gt;
&lt;p&gt;One more thing, make sure your browser support windown authentication by go to Menu -&amp;gt; Tools -&amp;gt; Internet Options -&amp;gt; Advanced -&amp;gt; Security -&amp;gt; check Enabled Integrated Windown Authentication.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This works perfectly for me with 95% of my end user in my company, there there's some other user whose still get the pop up window message.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I believe that this is not about the code, it's about your server security setup which I missed somewhere. &lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;WHOEVER ENCOUNTERED THIS AND GOT IT FIX, PLEASE POST IT UP TO HELP US WHO ARE IN FRUSTRATION WITH THIS.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;Thanks Guys&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1546939.aspx</link><pubDate>Wed, 24 Jan 2007 19:31:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1546939</guid><dc:creator>nobe prince</dc:creator><author>nobe prince</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1546939.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1546939</wfw:commentRss><description>&lt;p&gt;HI Bavesh&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;try this &lt;font size=2&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;prince&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1534011.aspx</link><pubDate>Tue, 16 Jan 2007 07:07:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534011</guid><dc:creator>ranganh</dc:creator><author>ranganh</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534011.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1534011</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Bhavesh,&lt;/p&gt;
&lt;p&gt;"My" namespace is relevant in VB.NET.&lt;/p&gt;
&lt;p&gt;Regarding your point on IIS - Allow anonymous access, you are right.&amp;nbsp; However,&amp;nbsp;IIS Still passes on the credentials of the windows logon.&amp;nbsp; I would suggest, you setting "Allow Anonymous Access" and&amp;nbsp;in the Web.Config deny users="?&lt;/p&gt;
&lt;p&gt;Check if it shows up an username in a simple ASPX Page using User.Identity.Name.&amp;nbsp; If it doesnt show up, then there is some other issue.&amp;nbsp; This has worked for many folks very well and denying anonymous access in IIS would always popup the Windows&amp;nbsp;Login Modal, which is ugly for a web application.&lt;/p&gt;
&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1530412.aspx</link><pubDate>Fri, 12 Jan 2007 21:21:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1530412</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1530412.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1530412</wfw:commentRss><description>&lt;p&gt;Hi jae, thanks for yr answer... I tried your second comment &lt;strong&gt;my.user.isauthenticated , &lt;/strong&gt;but it is giving me compilation error like below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"&amp;nbsp;The name 'my' does not exist in the current context&amp;nbsp;"&lt;/p&gt;
&lt;p&gt;Is that any library or directory that I need to add in my project to use this "my" object or class&amp;nbsp;????&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Also guys, here is one more thing that I tried, I created very simple page with one label on it and applying text to that label from code behind file as below :&lt;/p&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;protected&lt;/p&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;void&lt;/font&gt;&lt;font size=2&gt; Page_Load(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt; sender, &lt;/font&gt;&lt;font color=#008080 size=2&gt;EventArgs&lt;/font&gt;&lt;font size=2&gt; e)
&lt;p&gt;{&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size=2&gt;lbl_UserName.Text = &lt;/font&gt;&lt;font color=#800000 size=2&gt;"Your are: "&lt;/font&gt;&lt;font size=2&gt; + Page.User.Identity.Name.ToString();&amp;nbsp; }&lt;/font&gt;
&lt;p&gt;&lt;font size=2&gt;&lt;strong&gt;with Web.cofig as following: &lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size=2&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;system.web&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;p&gt;&amp;nbsp;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;compilation&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;debug&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authentication&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;mode&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Windows&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;deny&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;users&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;?&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;&amp;nbsp; // To disable Anonymous User
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;system.web&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;Then I uploaded this whole application to our server (server 2003, IIS 6)..... The output is so confusing me.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&lt;u&gt;OutPut&lt;/u&gt; : its kind of &lt;strong&gt;random&lt;/strong&gt;, sometimes the page displays the DOMAINNAME\USERNAME with out any pop up and sometimes its just keep poping up the window for username and password,even if i entered the correct password and username, it redirects the IE to this message "you are not authorized to view this page"&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;its real kind of weired for me..... cant come up with any idea on this, any further help???&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1530300.aspx</link><pubDate>Fri, 12 Jan 2007 19:54:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1530300</guid><dc:creator>jae.lee</dc:creator><author>jae.lee</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1530300.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1530300</wfw:commentRss><description>&lt;p&gt;&amp;lt;authentication&amp;gt; tags only determine how your IIS will either allow or not allow connections to the server. (it's&amp;nbsp;a behavior issues)&lt;/p&gt;
&lt;p&gt;However, you should really look at my second comment on using &lt;strong&gt;my.user.isauthenticated &lt;/strong&gt;to design your authentication criteria rather than to just check if user is missing username or not.&lt;/p&gt;
&lt;p&gt;It's incorrect methods also will not return constant results amongs differnt settings and servers.&lt;/p&gt;
&lt;p&gt;Let me know....&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Jae.&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1529848.aspx</link><pubDate>Fri, 12 Jan 2007 15:20:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1529848</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1529848.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1529848</wfw:commentRss><description>&lt;p&gt;Hi folks... first of all thanks for replying.... thanks a lot&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To Harrish, as u mentioned "&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Allow Anonymous Access" checkbox should be checked",&amp;nbsp; which shouldnt be, bcoz if &lt;font face=Arial&gt;To Anonymous Access is checked(on), then IIS wont even bother for username or any credantials from which the web page is being requested and the output for the user.Identity.Name will be&amp;nbsp;NULL string only. I have already tried it and it is returning&amp;nbsp;Null string, so by either a way, "Allow Anonymous Access" should be checked off or by using web.config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="Courier New"&gt;&amp;lt;authorization&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font face=Arial&gt;&lt;font face="Courier New"&gt;&lt;span style="mso-tab-count:3;"&gt; &lt;/span&gt;&amp;lt;deny users=&lt;span class=st&gt;"?"&lt;/span&gt;/&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;lt;/authorization&amp;gt;... I have to disable the Anonymous access. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font face=Arial&gt;&lt;font face="Courier New"&gt;To Jae,&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font face=Arial&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; I am basically using this code &lt;font color=#ff0000 size=2&gt;Visible&lt;/font&gt;&lt;font color=#0000ff size=2&gt;='&lt;/font&gt;&lt;font size=2&gt;&amp;lt;%# Page.User.IsInRole("DOMAINNAME\\USERNAME") %&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;'&amp;nbsp;&lt;font face=Arial color=#000000&gt; in a one button in each page and also using Page.User.Identity.Name concept in my master page. so to keep that two things on working, I have to disable the anonymous access and enable Windows authentication. I tried using all below different configuration in web.config:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font face=Arial&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;(1)&amp;nbsp;Anonymous Access Box checked off(disabled)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;compilation&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;debug&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authentication&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;mode&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Windows&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;allow&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;users&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;*&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;o:p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:'Times New Roman';mso-fareast-font-family:'Times New Roman';mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font face=Arial&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;(2)&amp;nbsp;Anonymous Access Box checked on(enabled) [NOTE: but still I am disabling it by below web.config]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;compilation&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;debug&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authentication&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;mode&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Windows&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#800000 size=2&gt;deny&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;users&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;?&lt;/font&gt;&lt;font color=#000000 size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;&amp;nbsp;&lt;/font&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;lt;/&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;identity &lt;b&gt;impersonate&lt;/b&gt;="true" /&amp;gt;&lt;/o:p&gt;
&lt;p&gt;&lt;o:p&gt;I think this would help you guys in better way to solve this issue....&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;&lt;o:p&gt;Once again thanks a lot for your previous reply and time.&lt;/o:p&gt;&lt;/p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1529583.aspx</link><pubDate>Fri, 12 Jan 2007 12:37:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1529583</guid><dc:creator>jae.lee</dc:creator><author>jae.lee</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1529583.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1529583</wfw:commentRss><description>&lt;p&gt;when you validate, you indicated you are using user.identity.name being nothing as indicator for valid authentication.&lt;/p&gt;
&lt;p&gt;you can do two things.&lt;/p&gt;
&lt;p&gt;1. configure web.config to have: (this will allow you server's AD or integrated authentication to take care of authentication.&lt;/p&gt;&lt;pre class=coloredcode&gt;		&amp;lt;authentication mode=&lt;span class=st&gt;"Windows"&lt;/span&gt;/&amp;gt;
		&amp;lt;authorization&amp;gt;
			&amp;lt;deny users=&lt;span class=st&gt;"?"&lt;/span&gt;/&amp;gt;
		&amp;lt;/authorization&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;2. instead of using USER.IDENTITY.NAME, use following:&lt;/p&gt;&lt;pre class=coloredcode&gt;My.User.IsAuthenticated&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;this is a BOOLEAN which will return if your user is authenticated or not.&lt;/p&gt;
&lt;p&gt;hope this helps.&lt;/p&gt;
&lt;p&gt;Jae.&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1529569.aspx</link><pubDate>Fri, 12 Jan 2007 12:20:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1529569</guid><dc:creator>ranganh</dc:creator><author>ranganh</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1529569.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1529569</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the IIS, make sure that for this virtual directory, you have turned on "Allow Anonymous Access"&amp;nbsp; It would be in the "Directory Security" Tab of the Virtual Directory Properties.&lt;/p&gt;
&lt;p&gt;Basically the "Allow Anonymous Access" checkbox should be checked.&lt;/p&gt;
&lt;p&gt;Write back if this still doesnt help.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1528183.aspx</link><pubDate>Thu, 11 Jan 2007 16:54:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1528183</guid><dc:creator>BhaveshPatel</dc:creator><author>BhaveshPatel</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1528183.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1528183</wfw:commentRss><description>&lt;p&gt;I tried as u mentioned.. as making changes like below to my web.config and turning off the anonymous access. still it is poping up the username and password window.&lt;/p&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;system.web&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;compilation&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;debug&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authentication&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;mode&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Windows&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;/&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;deny&lt;/font&gt;&lt;font color=#0000ff size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;users&lt;/font&gt;&lt;font color=#0000ff size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt;?&lt;/font&gt;&lt;font size=2&gt;"&lt;/font&gt;&lt;font color=#0000ff size=2&gt; /&amp;gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;authorization&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;&amp;lt;/&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;system.web&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; is there anything like this application(when I am publishing to the server) has not enough privileges to access the username from IIS? I am not master of asp.net or IIS.. I just started working on it. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp; or is there any other Idea for it???&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1527992.aspx</link><pubDate>Thu, 11 Jan 2007 15:03:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1527992</guid><dc:creator>Skip_Frog</dc:creator><author>Skip_Frog</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1527992.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1527992</wfw:commentRss><description>I had the same problem that I resolved by turning off anonymous access in IIS. Not sure if I should have done in the web.config file instead?</description></item><item><title>Re: user.identity.name doesn't work on server</title><link>http://forums.asp.net/thread/1527573.aspx</link><pubDate>Thu, 11 Jan 2007 08:40:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1527573</guid><dc:creator>ranganh</dc:creator><author>ranganh</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1527573.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1527573</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are using&amp;nbsp;User.Identity.Name and&amp;nbsp;implementing Windows Authentication, make sure that you turn off anonymous access in your Web.Config.&lt;/p&gt;
&lt;p&gt;Your Web.Config should read as follows:-&lt;/p&gt;
&lt;p&gt;&amp;lt;authentication mode="Windows" /&amp;gt; &lt;br /&gt;&amp;lt;authorization&amp;gt; &lt;br /&gt;&amp;lt;deny users="?" /&amp;gt; &lt;br /&gt;&amp;lt;/authorization&amp;gt; &lt;/p&gt;
&lt;p&gt;Write back if this still doesnt help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>