Why Context.User.Identity.Name returns blank ?

One of my friends mailed on our INETA User Group mailing list asking that he is unable to recieve the name associated with Windows Identity object in his asp.net web application. He further claimed that he had set “authentication mode” to “windows authentication”. Following was my response to that: check that if the current user is authenticated or not. u may try this if block: if(this.Context.User.Identity.IsAuthenticated) and if u come to know that the user is not authenticated (which i am sure u will find) then this means that like most of us u have enabled anonymous access. try disabling … Continue reading Why Context.User.Identity.Name returns blank ?

Enabling Sessions for ASP.NET Web Parts in Sharepoint Portal 2003

To Enable Session State in Sharepoint Portal 2003 you will need to do couple of amendments in the “Web.Config“ placed at the root of your virtual server. (usually available at C:\Inetpub\wwwroot ).   Edit your web config file using any editor. (I use Ultra Edit).   1) Enabling SessionStateModule:Find this tage and enable it: (It is disabled/commented by default)              2) Enable SessionState: Enable session state (Set to true):         Programmatically check if the session has been enabled on Sharepoint Server or not: Develop a Web Part and place the following code to test if the session has been enabled or not. … Continue reading Enabling Sessions for ASP.NET Web Parts in Sharepoint Portal 2003

Hello MS MVP Blogs!

Hello Every One, This is my first blog at MS MVPS.com. I will be sharing my experiences with .NET in general and C#,ASP.NET,XML Web Services, and .Net Servers in particular. So stay tuned!   Hammad Rajjoub,MVP (Windows Server System – XML Web Services), User Group Leader – Dot Net Wizards (http://dotnetwizards.blogspot.com),Chariman UG Relations Committee (http://inetapakistan.org),Member Speakers Bureau (http://mea.ineta.org)