diff --git a/ResoursesManager/ResoursesManager/Models/IdentityModels.cs b/ResoursesManager/ResoursesManager/Models/IdentityModels.cs index 89065c9..51ab39f 100644 --- a/ResoursesManager/ResoursesManager/Models/IdentityModels.cs +++ b/ResoursesManager/ResoursesManager/Models/IdentityModels.cs @@ -143,6 +143,16 @@ namespace ResoursesManager.Models }; context.Statistic.Add(model); } + foreach (var resource in defaults) + { + foreach (var user in users) + { + if (r.Next(0,10) >= 5 ) + { + resource.Users.Add(user); + } + } + } base.Seed(context); } diff --git a/ResoursesManager/ResoursesManager/logs/log.txt b/ResoursesManager/ResoursesManager/logs/log.txt index eeeb650..649482b 100644 --- a/ResoursesManager/ResoursesManager/logs/log.txt +++ b/ResoursesManager/ResoursesManager/logs/log.txt @@ -864,3 +864,233 @@ System.Data.DataException: An exception occurred while initializing the database at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1 predicate) at ResoursesManager.MvcApplication.Application_Start() in C:\Users\blaketillman159\Source\Repos\thesis\ResoursesManager\ResoursesManager\Global.asax.cs:line 45 +ERROR 2017-11-07 20:08:17,503 3618ms MvcApplication Application_Start - Admin User, Role create +System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Cannot attach the file 'C:\Git\Thesis\ResoursesManager\ResoursesManager\App_Data\ResoursesManager.mdf' as database 'ResoursesManager'. + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.Open() + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t, DbConnectionInterceptionContext c) + at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) + at System.Data.Entity.Core.EntityClient.EntityConnection.b__2() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + --- End of inner exception stack trace --- + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) + at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() + at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() + at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.b__1[TResult](IEnumerable`1 sequence) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) + at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression) + at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) + at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext) + at System.Data.Entity.Internal.InternalContext.QueryForModelHash() + at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) + at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.b__e() + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + --- End of inner exception stack trace --- + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() + at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) + at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() + at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) + at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() + at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() + at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() + at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1 predicate) + at ResoursesManager.MvcApplication.Application_Start() in C:\Git\Thesis\ResoursesManager\ResoursesManager\Global.asax.cs:line 45 +ERROR 2017-11-18 15:23:46,412 14934239ms NotificationHelper Send - Save notification message +System.NullReferenceException: Object reference not set to an instance of an object. + at ResoursesManager.Helpers.NotificationHelper.Send(List`1 users, String title, String message, String img, String url) in C:\Git\Thesis\ResoursesManager\ResoursesManager\Helpers\NotificationHelper.cs:line 63 +INFO 2017-11-18 16:15:04,246 18012073ms ReservationsController Create - Új Foglalás: , user: admin@admin.hu, kezdőIdőpont: 18/11/2017 17:15:00, befejezőIdőpont: 18/11/2017 18:15:00 +ERROR 2017-11-18 16:15:04,295 18012122ms NotificationHelper Send - Save notification message +System.NullReferenceException: Object reference not set to an instance of an object. + at ResoursesManager.Helpers.NotificationHelper.Send(List`1 users, String title, String message, String img, String url) in C:\Git\Thesis\ResoursesManager\ResoursesManager\Helpers\NotificationHelper.cs:line 63 +INFO 2017-11-18 16:17:17,747 18145574ms ReservationsController Edit - Új foglalás: , user: admin@admin.hu, kezdőIdőpont: 18/11/2017 17:16:00, befejezőIdőpont: 18/11/2017 18:15:00 +ERROR 2017-11-18 16:17:17,803 18145630ms NotificationHelper Send - Save notification message +System.NullReferenceException: Object reference not set to an instance of an object. + at ResoursesManager.Helpers.NotificationHelper.Send(List`1 users, String title, String message, String img, String url) in C:\Git\Thesis\ResoursesManager\ResoursesManager\Helpers\NotificationHelper.cs:line 63 +INFO 2017-11-18 16:18:44,658 18232486ms ReservationsController Create - Új Foglalás: , user: admin@admin.hu, kezdőIdőpont: 18/11/2017 17:18:00, befejezőIdőpont: 18/11/2017 18:18:00 +INFO 2017-11-18 16:38:13,118 19400945ms ReservationsController Create - Új Foglalás: , user: pelda.janos@email.hu, kezdőIdőpont: 18/11/2017 17:38:00, befejezőIdőpont: 18/11/2017 18:38:00 +INFO 2017-11-18 16:43:42,752 19730580ms ReservationsController Create - Új Foglalás: , user: pelda.janos@email.hu, kezdőIdőpont: 18/11/2017 17:43:00, befejezőIdőpont: 18/11/2017 18:43:00 +ERROR 2018-03-11 10:10:42,304 3367ms MvcApplication Application_Start - Admin User, Role create +System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Cannot attach the file 'C:\Git\Thesis\ResoursesManager\ResoursesManager\App_Data\ResoursesManager.mdf' as database 'ResoursesManager'. + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.Open() + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t, DbConnectionInterceptionContext c) + at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) + at System.Data.Entity.Core.EntityClient.EntityConnection.b__2() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + --- End of inner exception stack trace --- + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) + at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() + at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() + at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.b__1[TResult](IEnumerable`1 sequence) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) + at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression) + at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) + at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext) + at System.Data.Entity.Internal.InternalContext.QueryForModelHash() + at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) + at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.b__e() + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + --- End of inner exception stack trace --- + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() + at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) + at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() + at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) + at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() + at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() + at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() + at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1 predicate) + at ResoursesManager.MvcApplication.Application_Start() in C:\Git\Thesis\ResoursesManager\ResoursesManager\Global.asax.cs:line 45 +ERROR 2018-03-11 10:24:25,379 3098ms MvcApplication Application_Start - Admin User, Role create +System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Cannot attach the file 'C:\Git\Thesis\ResoursesManager\ResoursesManager\App_Data\ResoursesManager.mdf' as database 'ResoursesManager'. + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.Open() + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t, DbConnectionInterceptionContext c) + at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) + at System.Data.Entity.Core.EntityClient.EntityConnection.b__2() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + --- End of inner exception stack trace --- + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) + at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() + at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() + at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.b__1[TResult](IEnumerable`1 sequence) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) + at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression) + at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) + at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext) + at System.Data.Entity.Internal.InternalContext.QueryForModelHash() + at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) + at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.b__e() + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + --- End of inner exception stack trace --- + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() + at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) + at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() + at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) + at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() + at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() + at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() + at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1 predicate) + at ResoursesManager.MvcApplication.Application_Start() in C:\Git\Thesis\ResoursesManager\ResoursesManager\Global.asax.cs:line 45 +ERROR 2018-03-11 10:24:57,933 2985ms MvcApplication Application_Start - Admin User, Role create +System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Cannot attach the file 'C:\Git\Thesis\ResoursesManager\ResoursesManager\App_Data\ResoursesManager.mdf' as database 'ResoursesManager'. + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) + at System.Data.SqlClient.SqlConnection.Open() + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t, DbConnectionInterceptionContext c) + at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) + at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) + at System.Data.Entity.Core.EntityClient.EntityConnection.b__2() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + --- End of inner exception stack trace --- + at System.Data.Entity.Core.EntityClient.EntityConnection.Open() + at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) + at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) + at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() + at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) + at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) + at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() + at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() + at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.b__1[TResult](IEnumerable`1 sequence) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot) + at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) + at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression) + at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) + at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext) + at System.Data.Entity.Internal.InternalContext.QueryForModelHash() + at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) + at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) + at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.b__e() + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + --- End of inner exception stack trace --- + at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) + at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() + at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) + at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) + at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() + at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) + at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() + at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() + at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() + at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1 predicate) + at ResoursesManager.MvcApplication.Application_Start() in C:\Git\Thesis\ResoursesManager\ResoursesManager\Global.asax.cs:line 45 +INFO 2018-03-11 10:28:05,732 137081ms ReservationsController Create - Új Foglalás: , user: admin@admin.hu, kezdőIdőpont: 2018. 03. 31. 11:27:00, befejezőIdőpont: 2018. 03. 31. 12:27:00 +ERROR 2018-03-11 10:28:05,897 137246ms NotificationHelper Send - Save notification message +System.NullReferenceException: Object reference not set to an instance of an object. + at ResoursesManager.Helpers.NotificationHelper.Send(List`1 users, String title, String message, String img, String url) in C:\Git\Thesis\ResoursesManager\ResoursesManager\Helpers\NotificationHelper.cs:line 63