I have an MVC 4 application, and while registering I have come across issue where data is saved in usertable but not in other table i.e user_detail etc.., to avoid that I tried to use tranascationScope well it worked for the registemethod as below.
public ActionResult Register(model model)
{
using (var scope = new TransactionScope())
{
WebSecurity.CreateUserAndAccount(model.RegUserName, randomPassword,....)
// other table commit.
// other table commit.
}
}
Once after register a call is being made to any action method as below
private void AuthenticateUser(string userName)
{
int userId = WebSecurity.GetUserId(userName);
}
The current TransactionScope is already complete.
I am getting the above error and the connection is a single and using EF5.