Error 500 on login …
 
Notifications
Clear all

[Solved] Error 500 on login page

3 Posts
2 Users
1 Reactions
5,067 Views
Posts: 0
Topic starter
Joined: 1 second ago

Hi,

We have recently updated to the latest 3.2 by updating to the latest 3.1 first.

On occasion, when visiting the CloudPanel login page, we are presented with a 500 error as below. A quick refresh/reload and the error is gone, and i get the expected branding. and all is ok. The error mentions Nancy, so im guessing its a templating issue, but it also doesnt happen every time :(.

System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CSharp.CSharpCodeGenerator.GenerateStatements(CodeStatementCollection stms) at Microsoft.CSharp.CSharpCodeGenerator.GenerateMethod(CodeMemberMethod e, CodeTypeDeclaration c) at Microsoft.CSharp.CSharpCodeGenerator.GenerateMethods(CodeTypeDeclaration e) at Microsoft.CSharp.CSharpCodeGenerator.GenerateType(CodeTypeDeclaration e) at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o) at Microsoft.CSharp.CSharpCodeGenerator.GenerateTypes(CodeNamespace e) at Microsoft.CSharp.CSharpCodeGenerator.GenerateNamespace(CodeNamespace e) at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromNamespace(CodeNamespace e, TextWriter w, CodeGeneratorOptions o) at Microsoft.CSharp.CSharpCodeGenerator.GenerateNamespaces(CodeCompileUnit e) at Microsoft.CSharp.CSharpCodeGenerator.GenerateCompileUnit(CodeCompileUnit e) at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromCompileUnit(CodeCompileUnit e, TextWriter w, CodeGeneratorOptions o) at Nancy.ViewEngines.Razor.RazorViewEngine.GenerateRazorViewFactory(IRazorViewRenderer renderer, GeneratorResults generatorResults, Type passedModelType, ViewLocationResult viewLocationResult) at Nancy.ViewEngines.Razor.RazorViewEngine.GetCompiledViewFactory(TextReader reader, Type passedModelType, ViewLocationResult viewLocationResult) at Nancy.ViewEngines.Razor.RazorViewEngine.<>c__DisplayClass22_0.<GetOrCompileView>b__0(ViewLocationResult x) at Nancy.ViewEngines.DefaultViewCache.<>c__DisplayClass3_0`1.<GetOrAdd>b__0(ViewLocationResult x) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Nancy.ViewEngines.DefaultViewCache.GetOrAdd[TCompiledView](ViewLocationResult viewLocationResult, Func`2 valueFactory) at Nancy.ViewEngines.Razor.RazorViewEngine.GetOrCompileView(ViewLocationResult viewLocationResult, IRenderContext renderContext, Type passedModelType) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Nancy.ViewEngines.Razor.RazorViewEngine.GetViewInstance(ViewLocationResult viewLocationResult, IRenderContext renderContext, Object model) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Nancy.ViewEngines.Razor.RazorViewEngine.<>c__DisplayClass9_0.<RenderView>b__0(Stream stream) at Nancy.Responses.MaterialisingResponse.PreExecute(NancyContext context) at Nancy.NancyEngine.<InvokeRequestLifeCycle>d__22.MoveNext()

2 Replies
Posts: 1607
Admin
Noble Member
Joined: 10 years ago

This can happen occasionally when the IIS app pool recycles when CloudPanel is idle. We recommend setting the ISS application pool to 0 to prevent it from recycling so often.

Reply
Posts: 0
Topic starter
Joined: 1 second ago

Thanks, that seems to have fixed it 🙂

Reply
Share: