From a1e7a0851da203f9f795663bf951c5136dbdc0c5 Mon Sep 17 00:00:00 2001 From: Yehor Date: Thu, 21 Sep 2017 18:32:17 +0300 Subject: [PATCH] Added password restore functionality --- .../eFormAPI/Controllers/AccountController.cs | 53 +- .../Security/ApplicationOAuthProvider.cs | 3 - .../Infrastructure/Services/EmailService.cs | 60 +- eFormAPI/eFormAPI/Web.config | 5 + eFormAPI/eFormAPI/expection.txt | 865 ++++++++++++++++++ .../Models/Auth/ForgotPasswordModel.cs | 10 + .../Models/Auth/ResetPasswordModel.cs | 22 + .../eFromAPI.Common/eFromAPI.Common.csproj | 2 + eform-client/src/app/app.module.ts | 6 +- eform-client/src/app/app.routing.ts | 5 + .../app/components/auth/auth.component.css | 5 + .../app/components/auth/auth.component.html | 45 +- .../src/app/components/auth/auth.component.ts | 43 +- .../auth/restore-password.component.css | 36 + .../auth/restore-password.component.html | 38 + .../auth/restore-password.component.ts | 77 ++ .../directives/equal-validator.directive.ts | 26 + eform-client/src/app/models/auth/index.ts | 2 + .../app/models/auth/password-restore.model.ts | 6 + .../src/app/services/accounts/auth.service.ts | 18 +- 20 files changed, 1267 insertions(+), 60 deletions(-) create mode 100644 eFormAPI/eFromAPI.Common/Models/Auth/ForgotPasswordModel.cs create mode 100644 eFormAPI/eFromAPI.Common/Models/Auth/ResetPasswordModel.cs create mode 100644 eform-client/src/app/components/auth/restore-password.component.css create mode 100644 eform-client/src/app/components/auth/restore-password.component.html create mode 100644 eform-client/src/app/components/auth/restore-password.component.ts create mode 100644 eform-client/src/app/components/directives/equal-validator.directive.ts create mode 100644 eform-client/src/app/models/auth/password-restore.model.ts diff --git a/eFormAPI/eFormAPI/Controllers/AccountController.cs b/eFormAPI/eFormAPI/Controllers/AccountController.cs index 0eb6acd44c..0ae407da88 100644 --- a/eFormAPI/eFormAPI/Controllers/AccountController.cs +++ b/eFormAPI/eFormAPI/Controllers/AccountController.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Net.Http; using System.Security.Claims; @@ -74,9 +75,8 @@ public async Task ChangePassword(ChangePasswordModel model) if (!ModelState.IsValid) { var allErrors = ModelState.Values.SelectMany(v => v.Errors); - return new OperationResult(false, string.Join(" ", allErrors.Select(x=>x.ErrorMessage))); + return new OperationResult(false, string.Join(" ", allErrors.Select(x => x.ErrorMessage))); } - var result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword); @@ -85,10 +85,57 @@ public async Task ChangePassword(ChangePasswordModel model) { return new OperationResult(false, string.Join(" ", result.Errors)); } - return new OperationResult(true); } + // POST: /account/forgot-password + [HttpPost] + [Route("forgot-password")] + [AllowAnonymous] + public async Task ForgotPassword(ForgotPasswordModel model) + { + if (ModelState.IsValid) + { + var user = await UserManager.FindByEmailAsync(model.Email); + if (user == null) + { + return new OperationResult(false); + } + var code = await UserManager.GeneratePasswordResetTokenAsync(user.Id); + var link = ConfigurationManager.AppSettings["app:siteLink"]; + link = $"{link}/login/restore-password?userId={user.Id}&code={code}"; + await UserManager.SendEmailAsync(user.Id, "Reset Password", + "Please reset your password by clicking here"); + return new OperationResult(true); + } + return new OperationResult(false); + } + + // POST: /account/reset-password + [HttpPost] + [Route("reset-password")] + [AllowAnonymous] + public async Task ResetPassword(ResetPasswordModel model) + { + if (!ModelState.IsValid) + { + var allErrors = ModelState.Values.SelectMany(v => v.Errors); + return new OperationResult(false, string.Join(" ", allErrors)); + } + var user = await UserManager.FindByIdAsync(model.UserId); + if (user == null) + { + return new OperationResult(false); + } + var result = await UserManager.ResetPasswordAsync(user.Id, model.Code, model.Password); + if (result.Succeeded) + { + return new OperationResult(true); + } + return new OperationResult(false, string.Join(" ", result)); + } + + #region Help Action //// GET api/Account/ManageInfo?returnUrl=%2F&generateState=true diff --git a/eFormAPI/eFormAPI/Infrastructure/Security/ApplicationOAuthProvider.cs b/eFormAPI/eFormAPI/Infrastructure/Security/ApplicationOAuthProvider.cs index f99afdcfd2..1978e91570 100644 --- a/eFormAPI/eFormAPI/Infrastructure/Security/ApplicationOAuthProvider.cs +++ b/eFormAPI/eFormAPI/Infrastructure/Security/ApplicationOAuthProvider.cs @@ -22,11 +22,8 @@ public ApplicationOAuthProvider(string publicClientId) public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { - var userManager = context.OwinContext.GetUserManager(); - EformUser user = await userManager.FindAsync(context.UserName, context.Password); - if (user == null) { context.SetError("The user name or password is incorrect.", "The user name or password is incorrect."); diff --git a/eFormAPI/eFormAPI/Infrastructure/Services/EmailService.cs b/eFormAPI/eFormAPI/Infrastructure/Services/EmailService.cs index 23a7579481..1920482891 100644 --- a/eFormAPI/eFormAPI/Infrastructure/Services/EmailService.cs +++ b/eFormAPI/eFormAPI/Infrastructure/Services/EmailService.cs @@ -1,42 +1,38 @@ -using System.Threading.Tasks; +using System; +using System.Configuration; +using System.IO; +using System.Net; +using System.Net.Mail; +using System.Net.Sockets; +using System.Threading.Tasks; using Microsoft.AspNet.Identity; namespace eFormAPI.Web.Infrastructure.Services { public class EmailService : IIdentityMessageService { - public async Task SendAsync(IdentityMessage message) + public Task SendAsync(IdentityMessage message) { - await configSendGridasync(message); - } - - // Use NuGet to install SendGrid (Basic C# client lib) - private async Task configSendGridasync(IdentityMessage message) - { - //var myMessage = new SendGridMessage(); - - //myMessage.AddTo(message.Destination); - //myMessage.From = new System.Net.Mail.MailAddress("taiseer@bitoftech.net", "Taiseer Joudeh"); - //myMessage.Subject = message.Subject; - //myMessage.Text = message.Body; - //myMessage.Html = message.Body; - - //var credentials = new NetworkCredential(ConfigurationManager.AppSettings["emailService:Account"], - // ConfigurationManager.AppSettings["emailService:Password"]); - - //// Create a Web transport for sending email. - //var transportWeb = new Web(credentials); - - // Send the email. - //if (transportWeb != null) - //{ - // await transportWeb.DeliverAsync(myMessage); - //} - //else - //{ - //Trace.TraceError("Failed to create Web transport."); - await Task.FromResult(0); - //} + int.TryParse(ConfigurationManager.AppSettings["email:smtpPort"], out int port); + var userName = ConfigurationManager.AppSettings["email:login"]; + var password = ConfigurationManager.AppSettings["email:password"]; + var smtp = new SmtpClient + { + Host = ConfigurationManager.AppSettings["email:smtpHost"], + Port = port, + EnableSsl = true, + DeliveryMethod = SmtpDeliveryMethod.Network, + UseDefaultCredentials = false, + Credentials = new NetworkCredential(userName, password) + }; + using (var mailMessage = new MailMessage(userName, message.Destination)) + { + mailMessage.Subject = message.Subject; + mailMessage.Body = message.Body; + mailMessage.IsBodyHtml = true; + smtp.Send(mailMessage); + } + return Task.FromResult(0); } } } \ No newline at end of file diff --git a/eFormAPI/eFormAPI/Web.config b/eFormAPI/eFormAPI/Web.config index 680a26ae73..67767d7a6c 100644 --- a/eFormAPI/eFormAPI/Web.config +++ b/eFormAPI/eFormAPI/Web.config @@ -19,6 +19,11 @@ + + + + + diff --git a/eFormAPI/eFormAPI/expection.txt b/eFormAPI/eFormAPI/expection.txt index d1052070d6..63e62bb70a 100644 --- a/eFormAPI/eFormAPI/expection.txt +++ b/eFormAPI/eFormAPI/expection.txt @@ -543,3 +543,868 @@ StackTrace : at System.ThrowHelper.ThrowInvalidOperationException(ExceptionRes 9/17/2017 12:18:17 AM // L:1 // ########################################################################### 9/17/2017 12:18:18 AM // L:-2 // ########################################################################### +9/17/2017 12:47:21 AM // L:-22 // Write logic failed // +9/17/2017 12:47:21 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.47:21 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:47:21 AM // L:1 // StartSqlOnly called +9/17/2017 12:47:21 AM // L:1 // ########################################################################### + +9/17/2017 12:47:21 AM // L:-2 // ########################################################################### +9/17/2017 12:47:22 AM // L:-22 // Write logic failed // +9/17/2017 12:47:22 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.47:22 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:47:21 AM // L:2 // TemplateItemRead called +9/17/2017 12:47:21 AM // L:2 // Communicator started +9/17/2017 12:47:21 AM // L:2 // Settings read +9/17/2017 12:47:21 AM // L:2 // SqlController and Logger started +9/17/2017 12:47:21 AM // L:1 // StartSqlOnly called +9/17/2017 12:47:21 AM // L:1 // ########################################################################### + +9/17/2017 12:47:22 AM // L:-2 // ########################################################################### +9/17/2017 12:47:22 AM // L:-22 // Write logic failed // +9/17/2017 12:47:22 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.47:22 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:47:22 AM // L:3 // Variable Name:templateId / Content:5 +9/17/2017 12:47:21 AM // L:2 // TemplateItemRead called +9/17/2017 12:47:21 AM // L:2 // Communicator started +9/17/2017 12:47:21 AM // L:2 // Settings read +9/17/2017 12:47:21 AM // L:2 // SqlController and Logger started +9/17/2017 12:47:21 AM // L:1 // StartSqlOnly called +9/17/2017 12:47:21 AM // L:1 // ########################################################################### + +9/17/2017 12:47:22 AM // L:-2 // ########################################################################### +9/17/2017 12:49:21 AM // L:-22 // Write logic failed // +9/17/2017 12:49:21 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.49:21 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:49:21 AM // L:2 // SqlController and Logger started +9/17/2017 12:49:21 AM // L:1 // StartSqlOnly called +9/17/2017 12:49:21 AM // L:1 // ########################################################################### + +9/17/2017 12:49:21 AM // L:-2 // ########################################################################### +9/17/2017 12:49:22 AM // L:-22 // Write logic failed // +9/17/2017 12:49:22 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.49:22 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:49:21 AM // L:2 // Settings read +9/17/2017 12:49:21 AM // L:2 // SqlController and Logger started +9/17/2017 12:49:21 AM // L:1 // StartSqlOnly called +9/17/2017 12:49:21 AM // L:1 // ########################################################################### + +9/17/2017 12:49:22 AM // L:-2 // ########################################################################### +9/17/2017 12:54:24 AM // L:-22 // Write logic failed // +9/17/2017 12:54:24 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.54:24 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:54:23 AM // L:1 // ########################################################################### + +9/17/2017 12:54:24 AM // L:-2 // ########################################################################### +9/17/2017 12:54:24 AM // L:-22 // Write logic failed // +9/17/2017 12:54:24 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.54:24 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:54:24 AM // L:2 // Settings read +9/17/2017 12:54:24 AM // L:2 // SqlController and Logger started +9/17/2017 12:54:24 AM // L:1 // StartSqlOnly called +9/17/2017 12:54:23 AM // L:1 // ########################################################################### + +9/17/2017 12:54:24 AM // L:-2 // ########################################################################### +9/17/2017 12:56:01 AM // L:-22 // Write logic failed // +9/17/2017 12:56:01 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.56:01 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:56:00 AM // L:1 // ########################################################################### + +9/17/2017 12:56:01 AM // L:-2 // ########################################################################### +9/17/2017 12:56:01 AM // L:-22 // Write logic failed // +9/17/2017 12:56:01 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.56:01 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:56:01 AM // L:2 // Communicator started +9/17/2017 12:56:01 AM // L:2 // Settings read +9/17/2017 12:56:01 AM // L:2 // SqlController and Logger started +9/17/2017 12:56:01 AM // L:1 // StartSqlOnly called +9/17/2017 12:56:00 AM // L:1 // ########################################################################### + +9/17/2017 12:56:01 AM // L:-2 // ########################################################################### +9/17/2017 12:56:12 AM // L:-22 // Write logic failed // +9/17/2017 12:56:12 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.56:12 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:56:12 AM // L:2 // Settings read +9/17/2017 12:56:12 AM // L:2 // SqlController and Logger started +9/17/2017 12:56:12 AM // L:1 // StartSqlOnly called +9/17/2017 12:56:12 AM // L:1 // ########################################################################### + +9/17/2017 12:56:12 AM // L:-2 // ########################################################################### +9/17/2017 12:56:13 AM // L:-22 // Write logic failed // +9/17/2017 12:56:13 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/17 00.56:13 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/17/2017 12:56:12 AM // L:3 // Variable Name:start / Content: +9/17/2017 12:56:12 AM // L:3 // Variable Name:templatId / Content:5 +9/17/2017 12:56:12 AM // L:2 // CaseReadAll called +9/17/2017 12:56:12 AM // L:2 // Communicator started +9/17/2017 12:56:12 AM // L:2 // Settings read +9/17/2017 12:56:12 AM // L:2 // SqlController and Logger started +9/17/2017 12:56:12 AM // L:1 // StartSqlOnly called +9/17/2017 12:56:12 AM // L:1 // ########################################################################### + +9/17/2017 12:56:13 AM // L:-2 // ########################################################################### +9/18/2017 11:40:32 AM // L:-22 // Write logic failed // +9/18/2017 11:40:32 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 11.40:32 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 11:40:32 AM // L:1 // ########################################################################### + +9/18/2017 11:40:32 AM // L:-2 // ########################################################################### +9/18/2017 11:40:33 AM // L:-22 // Write logic failed // +9/18/2017 11:40:33 AM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 11.40:33 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 11:40:33 AM // L:2 // SqlController and Logger started +9/18/2017 11:40:33 AM // L:1 // StartSqlOnly called +9/18/2017 11:40:32 AM // L:1 // ########################################################################### + +9/18/2017 11:40:33 AM // L:-2 // ########################################################################### +9/18/2017 4:36:47 PM // L:-22 // Write logic failed // +9/18/2017 4:36:47 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.36:47 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:36:47 PM // L:1 // ########################################################################### + +9/18/2017 4:36:47 PM // L:-2 // ########################################################################### +9/18/2017 4:36:48 PM // L:-22 // Write logic failed // +9/18/2017 4:36:48 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.36:48 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:36:47 PM // L:2 // Communicator started +9/18/2017 4:36:47 PM // L:2 // Settings read +9/18/2017 4:36:47 PM // L:2 // SqlController and Logger started +9/18/2017 4:36:47 PM // L:1 // StartSqlOnly called +9/18/2017 4:36:47 PM // L:1 // ########################################################################### + +9/18/2017 4:36:48 PM // L:-2 // ########################################################################### +9/18/2017 4:44:10 PM // L:-22 // Write logic failed // +9/18/2017 4:44:10 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.44:10 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:44:09 PM // L:1 // ########################################################################### + +9/18/2017 4:44:10 PM // L:-2 // ########################################################################### +9/18/2017 4:44:10 PM // L:-22 // Write logic failed // +9/18/2017 4:44:10 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.44:10 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:44:10 PM // L:3 // Variable Name:includeRemoved / Content:False +9/18/2017 4:44:10 PM // L:2 // TemplateItemReadAll called +9/18/2017 4:44:10 PM // L:2 // Communicator started +9/18/2017 4:44:10 PM // L:2 // Settings read +9/18/2017 4:44:10 PM // L:2 // SqlController and Logger started +9/18/2017 4:44:09 PM // L:1 // StartSqlOnly called +9/18/2017 4:44:09 PM // L:1 // ########################################################################### + +9/18/2017 4:44:10 PM // L:-2 // ########################################################################### +9/18/2017 4:53:45 PM // L:-22 // Write logic failed // +9/18/2017 4:53:45 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.53:45 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:53:45 PM // L:1 // ########################################################################### + +9/18/2017 4:53:45 PM // L:-2 // ########################################################################### +9/18/2017 4:53:46 PM // L:-22 // Write logic failed // +9/18/2017 4:53:46 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 16.53:46 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 4:53:45 PM // L:2 // SqlController and Logger started +9/18/2017 4:53:45 PM // L:1 // StartSqlOnly called +9/18/2017 4:53:45 PM // L:1 // ########################################################################### + +9/18/2017 4:53:46 PM // L:-2 // ########################################################################### +9/18/2017 5:28:17 PM // L:-22 // Write logic failed // +9/18/2017 5:28:17 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 17.28:17 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 5:28:17 PM // L:2 // Communicator started +9/18/2017 5:28:17 PM // L:2 // Settings read +9/18/2017 5:28:17 PM // L:2 // SqlController and Logger started +9/18/2017 5:28:17 PM // L:1 // StartSqlOnly called +9/18/2017 5:28:17 PM // L:1 // ########################################################################### + +9/18/2017 5:28:17 PM // L:-2 // ########################################################################### +9/18/2017 5:28:27 PM // L:-22 // Write logic failed // +9/18/2017 5:28:27 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 17.28:27 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 5:28:26 PM // L:1 // ########################################################################### + +9/18/2017 5:28:27 PM // L:-2 // ########################################################################### +9/18/2017 5:28:27 PM // L:-22 // Write logic failed // +9/18/2017 5:28:27 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 17.28:27 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 5:28:27 PM // L:2 // Settings read +9/18/2017 5:28:27 PM // L:2 // SqlController and Logger started +9/18/2017 5:28:27 PM // L:1 // StartSqlOnly called +9/18/2017 5:28:26 PM // L:1 // ########################################################################### + +9/18/2017 5:28:27 PM // L:-2 // ########################################################################### +9/18/2017 5:28:28 PM // L:-22 // Write logic failed // +9/18/2017 5:28:28 PM // L:-2 // ########################################################################### + +######## WriteLogEntry failed +######## 2017 09/18 17.28:28 +######## EXCEPTION FOUND; BEGIN ######## +######## -Expection at level 1- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Internal.InternalContext.SaveChanges() + at System.Data.Entity.Internal.LazyInternalContext.SaveChanges() + at System.Data.Entity.DbContext.SaveChanges() + at eFormSqlController.SqlController.WriteLogEntry(LogEntry logEntry) +######## -Expection at level 2- ######## +Message :Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions. +Source :EntityFramework +StackTrace : at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) + at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction) + at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() + at System.Data.Entity.Core.Objects.ObjectContext.b__35() + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) + at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) + at System.Data.Entity.Internal.InternalContext.SaveChanges() +######## EXCEPTION FOUND; ENDED ######## + + +9/18/2017 5:28:27 PM // L:2 // CaseReadByCaseId called +9/18/2017 5:28:27 PM // L:2 // Communicator started +9/18/2017 5:28:27 PM // L:2 // Settings read +9/18/2017 5:28:27 PM // L:2 // SqlController and Logger started +9/18/2017 5:28:27 PM // L:1 // StartSqlOnly called +9/18/2017 5:28:26 PM // L:1 // ########################################################################### + +9/18/2017 5:28:28 PM // L:-2 // ########################################################################### diff --git a/eFormAPI/eFromAPI.Common/Models/Auth/ForgotPasswordModel.cs b/eFormAPI/eFromAPI.Common/Models/Auth/ForgotPasswordModel.cs new file mode 100644 index 0000000000..191edad72c --- /dev/null +++ b/eFormAPI/eFromAPI.Common/Models/Auth/ForgotPasswordModel.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +namespace eFromAPI.Common.Models.Auth +{ + public class ForgotPasswordModel + { + [Required] + public string Email { get; set; } + } +} diff --git a/eFormAPI/eFromAPI.Common/Models/Auth/ResetPasswordModel.cs b/eFormAPI/eFromAPI.Common/Models/Auth/ResetPasswordModel.cs new file mode 100644 index 0000000000..374f3948ad --- /dev/null +++ b/eFormAPI/eFromAPI.Common/Models/Auth/ResetPasswordModel.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace eFromAPI.Common.Models.Auth +{ + public class ResetPasswordModel + { + [Required] + public int UserId { get; set; } + + [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] + [DataType(DataType.Password)] + [Display(Name = "Password")] + public string Password { get; set; } + + [DataType(DataType.Password)] + [Display(Name = "Confirm password")] + [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] + public string ConfirmPassword { get; set; } + + public string Code { get; set; } + } +} \ No newline at end of file diff --git a/eFormAPI/eFromAPI.Common/eFromAPI.Common.csproj b/eFormAPI/eFromAPI.Common/eFromAPI.Common.csproj index 1e3093b3e4..9aae313bf9 100644 --- a/eFormAPI/eFromAPI.Common/eFromAPI.Common.csproj +++ b/eFormAPI/eFromAPI.Common/eFromAPI.Common.csproj @@ -82,6 +82,8 @@ + + diff --git a/eform-client/src/app/app.module.ts b/eform-client/src/app/app.module.ts index 50cfd13ebd..f137d31268 100644 --- a/eform-client/src/app/app.module.ts +++ b/eform-client/src/app/app.module.ts @@ -28,6 +28,8 @@ import {CasesService} from 'app/services/cases/cases.service'; import {AuthService} from 'app/services/accounts/auth.service'; import {AuthGuard} from 'app/guards/auth.guard'; import {ImageService} from './services/files'; +import {RestorePasswordComponent} from 'app/components/auth/restore-password.component'; +import {EqualValidatorDirective} from 'app/components/directives/equal-validator.directive'; // import { // AdminService, @@ -47,11 +49,13 @@ import {ImageService} from './services/files'; declarations: [ AppComponent, AuthComponent, + RestorePasswordComponent, HeaderComponent, FooterComponent, NavigationComponent, FullLayoutComponent, - SimpleLayoutComponent + SimpleLayoutComponent, + EqualValidatorDirective ], imports: [ ReactiveFormsModule, diff --git a/eform-client/src/app/app.routing.ts b/eform-client/src/app/app.routing.ts index 429953f5d8..10fb4f28f5 100644 --- a/eform-client/src/app/app.routing.ts +++ b/eform-client/src/app/app.routing.ts @@ -5,6 +5,7 @@ import {FullLayoutComponent} from './layouts/fulllayout/fulllayout.component'; import {SimpleLayoutComponent} from 'app/layouts/simple-layout/simple-layout.component'; import {AuthComponent} from 'app/components/auth/auth.component'; import {AuthGuard} from 'app/guards/auth.guard'; +import {RestorePasswordComponent} from './components/auth/restore-password.component'; export const routes: Routes = [ { @@ -56,6 +57,10 @@ export const routes: Routes = [ path: '', component: AuthComponent, }, + { + path: 'restore-password', + component: RestorePasswordComponent + } ] }, // otherwise redirect to home diff --git a/eform-client/src/app/components/auth/auth.component.css b/eform-client/src/app/components/auth/auth.component.css index b4e7eaec69..99d51b8c82 100644 --- a/eform-client/src/app/components/auth/auth.component.css +++ b/eform-client/src/app/components/auth/auth.component.css @@ -17,6 +17,11 @@ padding-right: 14px; } +.envelope-addon { + padding-left: 12px; + padding-right: 12px; +} + .p-header-wrapper { margin-top: 35px; margin-bottom: 15px; diff --git a/eform-client/src/app/components/auth/auth.component.html b/eform-client/src/app/components/auth/auth.component.html index 5855d08a24..7088276500 100644 --- a/eform-client/src/app/components/auth/auth.component.html +++ b/eform-client/src/app/components/auth/auth.component.html @@ -15,20 +15,39 @@ + +
+
+ + +
+
+
+ + +
+
+ +
+ + Forgot the password? + +
+ + +
+
+ + +
+
+ +
+ + Back to login + +
-
-
- - -
-
-
- - -
-
- -
diff --git a/eform-client/src/app/components/auth/auth.component.ts b/eform-client/src/app/components/auth/auth.component.ts index 8be3306fe3..fbac78306d 100644 --- a/eform-client/src/app/components/auth/auth.component.ts +++ b/eform-client/src/app/components/auth/auth.component.ts @@ -4,6 +4,7 @@ import { Router } from '@angular/router'; import {AuthResponseModel, LoginRequestModel} from 'app/models/auth'; import {AuthService} from 'app/services/accounts/auth.service'; import {SettingsService} from 'app/services'; +import {NotifyService} from 'app/services/notify.service'; @Component({ @@ -12,18 +13,23 @@ import {SettingsService} from 'app/services'; styleUrls: ['./auth.component.css'] }) export class AuthComponent implements OnInit { - form: FormGroup; + formLogin: FormGroup; + formRestore: FormGroup; username: AbstractControl; + email: AbstractControl; password: AbstractControl; + + showLoginForm: boolean = true; error: string; constructor(private router: Router, private authService: AuthService, private settingsService: SettingsService, - private fb: FormBuilder) { } + private fb: FormBuilder, + private notifyService: NotifyService) { } - submitForm(): void { - this.authService.login(new LoginRequestModel(this.form.getRawValue())) + submitLoginForm(): void { + this.authService.login(new LoginRequestModel(this.formLogin.getRawValue())) .subscribe((result: AuthResponseModel) => { localStorage.setItem('currentAuth', JSON.stringify(result)); this.router.navigate(['/']).then(); @@ -34,13 +40,25 @@ export class AuthComponent implements OnInit { ); } + submitRestoreForm(): void { + this.authService.sendEmailRecoveryLink(this.formRestore.getRawValue()).subscribe((result) => { + if (result && result.success) { + this.notifyService.success({text: 'Successfully, check your email for instructions'}); + } + }, + (error) => { + this.error = error; + }, + ); + } + ngOnInit() { this.settingsService.connectionStringExist().subscribe((result) => { if (result && result.success === false) { this.router.navigate(['/settings/connection-string']).then(); } }); - this.form = this.fb.group({ + this.formLogin = this.fb.group({ username: [ '', Validators.required, @@ -50,7 +68,18 @@ export class AuthComponent implements OnInit { Validators.required, ], }); - this.username = this.form.get('username'); - this.password = this.form.get('password'); + this.formRestore = this.fb.group({ + email: [ + '', + [Validators.required, Validators.email] + ] + }); + this.username = this.formLogin.get('username'); + this.password = this.formLogin.get('password'); + this.email = this.formRestore.get('email'); + } + + toggleLoginForm(toggle: boolean) { + this.showLoginForm = toggle; } } diff --git a/eform-client/src/app/components/auth/restore-password.component.css b/eform-client/src/app/components/auth/restore-password.component.css new file mode 100644 index 0000000000..919c47eea5 --- /dev/null +++ b/eform-client/src/app/components/auth/restore-password.component.css @@ -0,0 +1,36 @@ +.wrapper-top { + margin-top: 100px; +} + +.img-wrapper { + max-height: 200px; + text-align: center; + margin: 0 auto 20px; +} + +.panel { + border: 0; +} + +.user-addon { + padding-left: 13px; + padding-right: 14px; +} + +.envelope-addon { + padding-left: 12px; + padding-right: 12px; +} + +.p-header-wrapper { + margin-top: 35px; + margin-bottom: 15px; +} + +.p-font { + font-size: 16px; +} + +.p-description { + font-weight: 500; +} diff --git a/eform-client/src/app/components/auth/restore-password.component.html b/eform-client/src/app/components/auth/restore-password.component.html new file mode 100644 index 0000000000..3e80252c54 --- /dev/null +++ b/eform-client/src/app/components/auth/restore-password.component.html @@ -0,0 +1,38 @@ + +
+
+
+
+
+
+
+

Microting eForm

+

No more paper-forms
+ and back-office data entry

+
+
+ +
+
+ +
+
+ + +
+
+
+ + +
+
+ +
+
+
+
+
+ +
diff --git a/eform-client/src/app/components/auth/restore-password.component.ts b/eform-client/src/app/components/auth/restore-password.component.ts new file mode 100644 index 0000000000..675eb78cc8 --- /dev/null +++ b/eform-client/src/app/components/auth/restore-password.component.ts @@ -0,0 +1,77 @@ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, AbstractControl, FormGroup, Validators } from '@angular/forms'; +import {ActivatedRoute, Params, Router} from '@angular/router'; +import {AuthResponseModel, PasswordRestoreModel} from 'app/models/auth'; +import {AuthService} from 'app/services/accounts/auth.service'; +import {Subscription} from 'rxjs/Subscription'; +import {toNumber} from 'ngx-bootstrap/timepicker/timepicker.utils'; +import {NotifyService} from 'app/services/notify.service'; + + +@Component({ + selector: 'restore-password', + templateUrl: './restore-password.component.html', + styleUrls: ['./restore-password.component.css'] +}) +export class RestorePasswordComponent implements OnInit { + passwordRestoreModel: PasswordRestoreModel = new PasswordRestoreModel; + formConfirmRestore: FormGroup; + password: AbstractControl; + private routeSubscription: Subscription; + confirmPassword: AbstractControl; + userId: AbstractControl; + code: AbstractControl; + error: string; + + constructor(private router: Router, + private authService: AuthService, + private fb: FormBuilder, private activatedRoute: ActivatedRoute, private notifyService: NotifyService) { } + + submitPasswordRestoreForm(): void { + debugger; + + this.passwordRestoreModel.password = this.password.value; + this.passwordRestoreModel.confirmPassword = this.confirmPassword.value; + this.authService.restorePassword(this.passwordRestoreModel) + .subscribe((result) => { + if (result && result.success) { + this.notifyService.success({text: 'Password successfully set'}); + this.router.navigate(['/login']).then(); + } else { + this.notifyService.success({text: 'Error while setting password'}); + } + }, + (error) => { + this.error = error; + }, + ); + } + + ngOnInit() { + debugger; + this.formConfirmRestore = this.fb.group({ + password: [ + '', + Validators.compose([Validators.minLength(6), Validators.required]) + ], + confirmPassword: [ + '', + Validators.required + ], + code : [ + '', + Validators.required, + ], + userId: [ + '', + Validators.required, + ] + }); + this.confirmPassword = this.formConfirmRestore.get('confirmPassword'); + this.password = this.formConfirmRestore.get('password'); + this.activatedRoute.queryParams.subscribe((params: Params) => { + this.passwordRestoreModel.userId = params['userId']; + this.passwordRestoreModel.code = params['code']; + }); + } +} diff --git a/eform-client/src/app/components/directives/equal-validator.directive.ts b/eform-client/src/app/components/directives/equal-validator.directive.ts new file mode 100644 index 0000000000..a4a7e6eb35 --- /dev/null +++ b/eform-client/src/app/components/directives/equal-validator.directive.ts @@ -0,0 +1,26 @@ +import { Directive, forwardRef, Attribute } from '@angular/core'; +import { Validator, AbstractControl, NG_VALIDATORS } from '@angular/forms'; + +@Directive({ + selector: '[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]', + providers: [ + { provide: NG_VALIDATORS, useExisting: forwardRef(() => EqualValidatorDirective), multi: true } + ] +}) +export class EqualValidatorDirective implements Validator { + constructor( @Attribute('validateEqual') public validateEqual: string) {} + + validate(c: AbstractControl): { [key: string]: any } { + // self value (e.g. retype password) + let v = c.value; + + // control value (e.g. password) + let e = c.root.get(this.validateEqual); + + // value not equal + if (e && v !== e.value) return { + validateEqual: false + } + return null; + } +} diff --git a/eform-client/src/app/models/auth/index.ts b/eform-client/src/app/models/auth/index.ts index 9197b62442..012471e2c7 100644 --- a/eform-client/src/app/models/auth/index.ts +++ b/eform-client/src/app/models/auth/index.ts @@ -1,2 +1,4 @@ export * from './login-request.model' export * from './auth-response.model' +export * from './password-restore.model' + diff --git a/eform-client/src/app/models/auth/password-restore.model.ts b/eform-client/src/app/models/auth/password-restore.model.ts new file mode 100644 index 0000000000..ed3c09f5c7 --- /dev/null +++ b/eform-client/src/app/models/auth/password-restore.model.ts @@ -0,0 +1,6 @@ +export class PasswordRestoreModel { + password: string; + confirmPassword: string; + code: string; + userId: number; +} diff --git a/eform-client/src/app/services/accounts/auth.service.ts b/eform-client/src/app/services/accounts/auth.service.ts index 32039b3e44..a8d40647d2 100644 --- a/eform-client/src/app/services/accounts/auth.service.ts +++ b/eform-client/src/app/services/accounts/auth.service.ts @@ -5,13 +5,16 @@ import {AuthResponseModel, LoginRequestModel} from 'app/models/auth'; import {Observable} from 'rxjs/Observable'; import {BaseService} from '../base.service'; import {ChangePasswordModel, UserInfoModel} from 'app/models'; +import {PasswordRestoreModel} from '../../models/auth/password-restore.model'; export let AuthMethods = { Login: 'api/auth/token', Logout: 'api/auth/logout', CheckToken: '/auth/is-token-actual', Restore: '/auth/restore', - ChangePassword: 'api/account/change-password' + ChangePassword: 'api/account/change-password', + RestoreUserPassword: '/api/account/reset-password', + EmailRecoveryLink: '/api/account/forgot-password', }; @Injectable() @@ -30,6 +33,19 @@ export class AuthService extends BaseService { }); } + restorePassword(model: PasswordRestoreModel): Observable { + return this.post(AuthMethods.RestoreUserPassword, model).map((result) => { + return result; + }); + } + + sendEmailRecoveryLink(rawValue: any): Observable { + debugger; + return this.post(AuthMethods.EmailRecoveryLink, {email: rawValue.email}).map((result) => { + return result; + }); + } + get isAuth(): boolean { const auth = localStorage.getItem('currentAuth'); if (auth) {