Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +201
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +219
   System.Data.SqlClient.SqlConnection.Open() +101
   System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c) +10
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +72
   System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) +359
   System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2() +55
   System.Data.Entity.SqlServer.<>c__DisplayClass1.<Execute>b__0() +10
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +189
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) +77
   System.Data.Entity.Core.EntityClient.EntityConnection.Open() +328
   System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) +133
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +46
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +155
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +189
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +282
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +11
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +45
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +186
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
   Blogerky.BusinessModel.DAL.EditorArticlesRepository.GetManyPublished(Int32 lastId, Int32 pageSize, Int32 categoryId, String text) in C:\Users\Jan\Projects\Blogerky.cz\Solutions\Blogerky\Blogerky.BusinessModel\DAL\EditorArticlesRepository.cs:51
   Blogerky.BusinessModel.BLL.Datasets.EditorArticlesDS.GetManyPublished(Int32 number) in C:\Users\Jan\Projects\Blogerky.cz\Solutions\Blogerky\Blogerky.BusinessModel\BLL\Datasets\EditorArticlesDS.cs:31
   Blogerky.Web.Controls.PopularMenuUC.BindData() in C:\Users\Jan\Projects\Blogerky.cz\Solutions\Blogerky\Blogerky.Web\Controls\PopularMenuUC.ascx.cs:28
   Blogerky.Web.Controls.PopularMenuUC.Page_Load(Object sender, EventArgs e) in C:\Users\Jan\Projects\Blogerky.cz\Solutions\Blogerky\Blogerky.Web\Controls\PopularMenuUC.ascx.cs:19
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0