<?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: Master Page User.Identity.Name problem</title><link>http://forums.asp.net/thread/1402849.aspx</link><pubDate>Mon, 18 Sep 2006 22:07:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1402849</guid><dc:creator>ethebaud</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1402849.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1402849</wfw:commentRss><description>&lt;p&gt;Much thanks. Both suggestions worked.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Ed&lt;/p&gt;</description></item><item><title>Re: Master Page User.Identity.Name problem</title><link>http://forums.asp.net/thread/1398594.aspx</link><pubDate>Thu, 14 Sep 2006 01:33:42 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1398594</guid><dc:creator>mokeefe</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1398594.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1398594</wfw:commentRss><description>Or &lt;font color="#0000ff" size="2"&gt;&lt;p&gt;Dim&lt;font size="2"&gt; strDomainUser &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = Context.User.Identity.Name&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;Context&amp;nbsp;object is available in earlier dotnet releases also.&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;If&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; Context.User.Identity.IsAuthenticated &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Response.Write(&lt;span style="color:maroon;"&gt;&amp;quot;Current user:&amp;quot; &amp;amp; &lt;/span&gt;Context.User.Identity.Name)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;Else&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Response.Write(&lt;span style="color:maroon;"&gt;&amp;quot;Unauthenticated request.&amp;quot;&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;End&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Master Page User.Identity.Name problem</title><link>http://forums.asp.net/thread/1398583.aspx</link><pubDate>Thu, 14 Sep 2006 01:19:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1398583</guid><dc:creator>lostlander</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1398583.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1398583</wfw:commentRss><description>&lt;p&gt;Try:&lt;/p&gt;&lt;p&gt;HttpContext.Current.User.identity.name&lt;/p&gt;&lt;p&gt;Or&lt;/p&gt;&lt;p&gt;Page.User.Identity.Name&lt;/p&gt;&lt;p&gt;Hope it helps!^_^&lt;/p&gt;</description></item><item><title>Master Page User.Identity.Name problem</title><link>http://forums.asp.net/thread/1398461.aspx</link><pubDate>Wed, 13 Sep 2006 21:41:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1398461</guid><dc:creator>ethebaud</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1398461.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1398461</wfw:commentRss><description>&lt;p&gt;Hello I&amp;#39;ve written some code to check information based on the authenticated user. The following code works&amp;nbsp;on an ASPX page load but fails when I move into a Master Page. Specifically, the error is &amp;quot;&lt;strong&gt;Compiler Error Message: &lt;/strong&gt;BC30451: Name &amp;#39;User&amp;#39; is not declared.&amp;quot;&amp;nbsp;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;p&gt;Protected&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; Page_Load(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.EventArgs) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.Load&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; Get &amp;amp; split Domain user Information&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; strDomainUser &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = User.Identity.Name&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;....&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;Any help would be appreciated.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Ed&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>