Hi Paul,
There is no track of any construct in your code which could resemble a
synchronization block. No, your method is not thread safe...
HTH,
--
Efran Cobisi
http://www.cobisi.com
Paul Cowan wrote:
Hi,
I have the following class:
public sealed class UserHelper
{
private static IUserService _userService;
public static SiteUser LoadCurrentUser()
{
if ((HttpContext.Current.User == null) ||
(!HttpContext.Current.User.Identity.IsAuthenticated))
throw new Exception("User is not authenticated.");
if (_userService == null)
_userService =
ContainerWebAccessorUtil.Container.Resolve<IUserService>();
return _userService.GetSiteUserByUid(new
Guid(HttpContext.Current.User.Identity.Name));
}
}
My question is, is this method thread safe from an ASP.NET application?
Thanks
Paul
[EMAIL PROTECTED]
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports,
weather, and much more.
http://www.live.com/getstarted
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com