hello. when my program run. it is ok.
but when it run a couple of hours。 it's error.
then i Reboot it. it is ok. but after a couple of hours . it's error again.
The Error:
2016-10-17 21:09:01.0620|ERROR|HomeController|System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxNodeCache.AddNode(GreenNode node, Int32 hash)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ContextAwareSyntax.LiteralExpression(SyntaxKind kind, SyntaxToken token)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseTerm(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpressionCore(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpression(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseArgumentExpression(Boolean isIndexer)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseArgumentList(SyntaxToken& openToken, SeparatedSyntaxList1& arguments, SyntaxToken& closeToken, SyntaxKind openKind, SyntaxKind closeKind)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseParenthesizedArgumentList()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParsePostFixExpression(ExpressionSyntax expr)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseTerm(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpressionCore(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpression(UInt32 precedence)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementNoDeclaration(Boolean allowAnyExpression)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementCore()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatements(CSharpSyntaxNode& previousNode, SyntaxListBuilder1 statements, Boolean stopOnSwitchSections)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseBlock(Boolean isMethodBody, Boolean isAccessorBody)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseBlockAndExpressionBodiesWithSemicolon(BlockSyntax& blockBody, ArrowExpressionClauseSyntax& expressionBody, SyntaxToken& semicolon)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMethodDeclaration(SyntaxListBuilder1 attributes, SyntaxListBuilder modifiers, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceOpt, SyntaxToken identifier, TypeParameterListSyntax typeParameterList)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMemberDeclarationOrStatement(SyntaxKind parentKind, String typeName)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseClassOrStructOrInterfaceDeclaration(SyntaxListBuilder1 attributes, SyntaxListBuilder modifiers)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseTypeDeclaration(SyntaxListBuilder1 attributes, SyntaxListBuilder modifiers)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMemberDeclarationOrStatement(SyntaxKind parentKind, String typeName)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceBody(SyntaxToken& openBrace, NamespaceBodyBuilder& body, SyntaxListBuilder& initialBadNodes, SyntaxKind parentKind)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceDeclaration()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceBody(SyntaxToken& openBrace, NamespaceBodyBuilder& body, SyntaxListBuilder& initialBadNodes, SyntaxKind parentKind)
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseCompilationUnitCore()
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseWithStackGuardTNode
at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseCompilationUnit()
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(SourceText text, CSharpParseOptions options, String path, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService.Compile(RelativeFileInfo fileInfo, String compilationContent)
at Microsoft.AspNetCore.Mvc.Razor.Internal.CompilerCache.CreateCacheEntry(String relativePath, String normalizedPath, Func2 compile)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.Internal.CompilerCache.GetOrAdd(String relativePath, Func2 compile)
at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet1 expirationTokens, String relativePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultFilterAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAllResultFiltersAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResourceFilterAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()
It's usually hard to figure out what the issue is just from a stack trace. Could you provide code that reproduces this?
I Have this problem too, it's just happened on iis started the web application thread.
Windows 10 IIS 10.0.14393.0
ASP.Net Core 1.1
and my project.json


and log

it's happened when my iis sleep the site thread and re-open,
and some of my content will trigger this exception.
i just update the .net runtime to lastest(1.0.5 and 1.1.2),
And it's still happened.
@yoyoys Based on the stack trace, your issue doesn't seem to be related to the one reported here. And since the stack trace points to ASP.NET MVC, I think you should report it on the aspnet/Mvc repo, ideally after checking it's not your code that throws the exception. You should probably also include your code, since it could be relevant, and post your project file as code, not an image.
Most helpful comment
@yoyoys Based on the stack trace, your issue doesn't seem to be related to the one reported here. And since the stack trace points to ASP.NET MVC, I think you should report it on the aspnet/Mvc repo, ideally after checking it's not your code that throws the exception. You should probably also include your code, since it could be relevant, and post your project file as code, not an image.