ASPX templates
Version 4.x > ASPX templates > CMSContext.CurrentUser.UserName = "public" in web service View modes: 
User avatar
Member
Member
alundgren04-gmail - 12/2/2009 1:13:10 AM
   
CMSContext.CurrentUser.UserName = "public" in web service


After using the Kentico membership logon control, and making an authenticated http request...

putting a breakpoint in the aspx and a watch onI put a watch on "CMSContext.CurrentUser.UserName" will return "andrew", as will a breakpoint in an ascx on the page, but when the page is done and sent to the client - if the client makes a subsequent web service call (to the same website) - "CMSContext.CurrentUser.UserName" will return "public"

I'm familiar with the need to enable session for web methods, is there something similar with authentication? Is this a bug?

CurrentUser.FullName = "Public Anonymous User"... what is this? IsAuthenticated is still true... yet it's "public" instead of my user. Please help me to understand and fix this.

Please help, this is halting dev.

Thank you
--
A

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 12/17/2009 3:30:32 PM
   
RE:CMSContext.CurrentUser.UserName = "public" in web service
Hello,

'Public' user is user that represents non-authenticated user.

Could you please try to call following method and let us know what user it returns?:

CMS.SiteProvider.UserInfoProvider.GetUserName();

Best Regards,

Martin Dobsicek