Base solution for your next web application
Open Closed

GetAllSettings of HostSettingsAppService throw exception #3650


User avatar
0
trendline created

On the server the deployed version, GetAllSettings method of the HostSettingsAppService throw below exception, but on the development environment it works fine, could give me some guide how to identify the problem?

System.FormatException: Invalid length for a Base-64 char array or string.
   at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64String(String s)
   at Abp.Runtime.Security.SimpleStringCipher.Decrypt(String cipherText, String passPhrase)
   at Viewtance.MES.Configuration.Host.HostSettingsAppService.d__8.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 Viewtance.MES.Configuration.Host.HostSettingsAppService.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 Abp.Threading.InternalAsyncHelper.d__5`1.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 Abp.Threading.InternalAsyncHelper.d__3`1.MoveNext()

1 Answer(s)
  • User Avatar
    0
    trendline created

    I found the answer, it caused by the password encrypt of mail smtp in settings, it is a bug fix in 4.2.1, here : <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/194">https://github.com/aspnetzero/aspnet-ze ... issues/194</a>