Hi!
I've got a transaction in which I'm creating a user and adding the user to a role. The addition of the user to the role is within a different method that creates it's own DataAccessAdapter and doesn't re-use the DataAccessAdapter that is in the method that has the transaction. I'm using the ReadCommitted isolation level for the transaction and everything goes well till the FetchEntityCollection within the method that I'm calling. The exception message that I get is:
"An exception was caught during the execution of a retrieval query: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."
Here are more of the specifics:
DataAccessAdapter daa = new DataAccessAdapter();
[colorvalue="00CC00"]
if (IsUsernameExists(daa, aUser.EmailId))
{
throw new Exception("User exists");
}
daa.StartTransaction(IsolationLevel.ReadCommitted, aUser.EmailId);
aUser.UserTypeId = (byte)EnumUserType.Candidate;
aUser.CreatedOn = DateTime.Now;
[colorvalue="00CC00"]
daa.SaveEntity(aUser, true);
[colorvalue="00CC00"]
UserRoles uroles = new UserRoles();
[colorvalue="00CC00"]
uroles.AddUsersToRoles(new string[] { aUser.EmailId }, new string[] { UserSecurityRoles.Candidate.ToString() });
daa.Commit();