webform membership2.0注入debug
private IUserContract _UserService; public IUserContract UserService { get { if (_UserService == null) { _UserService = ((IContainerProviderAccessor)HttpContext.Current.ApplicationInstance).ContainerProvider.ApplicationContainer.Resolve<IUserContract>(); } return _UserService; } }
改为
public IUserContract UserService { get { return ((IContainerProviderAccessor)HttpContext.Current.ApplicationInstance).ContainerProvider.RequestLifetime.Resolve<IUserContract>(); } }