Code: Select all
To test the code, we have a number of unit tests set up. I am debugging the code in the service through the unit test. To be clear, the app.config file is in the service project, not the test project. The module being tested has a property called CurrentUserName, which is included below:
Code: Select all
public string CurrentUserName {
get { return iCurrentUserName; }
set {
iCurrentUserName = value;
if ( ! string.IsNullOrEmpty( iCurrentUserName ) && ! string.IsNullOrWhiteSpace( iCurrentUserName ) ) {
MembershipUser user = Membership.GetUser( iCurrentUserName );
if ( user == null ) {
Log( string.Format( "User \"{0}\" is not a registered user. Cannot proceed with this user.", CurrentUserName ), EventTypeEnum.Error );
// Set the current user name to the empty string and the current domain ID to null
iCurrentUserName = string.Empty;
CurrentDomainId = null;
}
if ( user.IsLockedOut ) {
string msg = string.Format( "User \"{0}\" is currently locked out. Cannot proceed with this user.", CurrentUserName );
Log( msg, EventTypeEnum.Error );
iCurrentUserName = string.Empty;
CurrentDomainId = null;
}
CurrentUser = CarSystemUser.Attach( user, true );
UserProfile = CurrentUser.UserProfile;
UserProfile.Save();
CurrentDomainId = UserProfile.DomainId;
}
}
}
I checked the properties on the Devart.Data.PostgreSql.Web.dll file and they are set to Copy if newer. Is something wrong with my app.config or is it some other problem?
Tony[/quote]