Base solution for your next web application

Activities of "sanliotrade"

Is there a way to add the TenantId on log pattern?

Log4net has custom properties, but where to set the custom property on asp.net zero? (.net core + angular)

log4net.ThreadContext.Properties[ "tenantId" ] = _abpSession.TenantId;

Thank you!!

Question

Hello friends, I have the following error after deploy on an Azure service app. "HTTP Error 500.38 - ANCM Application DLL Not Found"

My asp.net zero version is ASP.NET CORE & Angular .NET Framework 4.6.1 v7.3.1

Enabling the debug log on app service i read the following: "Process path '.\Voiago.Web.Host.exe' is not dotnet, treating application as standalone or portable with bootstrapper"

Have you got an idea where is the wrong configuration?

LOG:
[aspnetcorev2.dll] Initializing logs for 'D:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll'. Process Id: 13540.. File Version: 13.0.19218.0. Description: IIS ASP.NET Core Module V2. Commit: 4a42afc5aea63750638e118560d43db04bd9ccc2.
[aspnetcorev2.dll] Resolving hostfxr parameters for application: '.\Voiago.Web.Host.exe' arguments: '' path: 'D:\home\site\wwwroot\'
[aspnetcorev2.dll] Known dotnet.exe location: ''
[aspnetcorev2.dll] Process path '.\Voiago.Web.Host.exe' is not dotnet, treating application as standalone or portable with bootstrapper
[aspnetcorev2.dll] Checking application.dll at 'D:\home\site\wwwroot\.\Voiago.Web.Host.dll'
[aspnetcorev2.dll] Event Log: 'Application 'D:\home\site\wwwroot\' failed to start. Exception message:
Application DLL was not found at D:\home\site\wwwroot\.\Voiago.Web.Host.dll. Confirm the application dll is present. Single-file deployments are not supported in IIS.' 
End Event Log Message.
[aspnetcorev2.dll] InvalidOperationException 'Application DLL was not found at D:\home\site\wwwroot\.\Voiago.Web.Host.dll. Confirm the application dll is present. Single-file deployments are not supported in IIS.' caught at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\HostFxrResolutionResult.cpp:64 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\HandlerResolver.cpp:68 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\HandlerResolver.cpp:171 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\applicationinfo.cpp:181 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\applicationinfo.cpp:96 
[aspnetcorev2.dll] Event Log: 'Failed to start application '/LM/W3SVC/553167786/ROOT', ErrorCode '0x8007023e'.' 
End Event Log Message.
[aspnetcorev2.dll] ASPNET_CORE_GLOBAL_MODULE::OnGlobalConfigurationChange 'MACHINE/WEBROOT/APPHOST/TRAVELGO-DEV-SERVER'
[aspnetcorev2.dll] Stopping application '/LM/W3SVC/553167786/ROOT'
[aspnetcorev2.dll] ASPNET_CORE_GLOBAL_MODULE::OnGlobalStopListening
[aspnetcorev2.dll] ASPNET_CORE_GLOBAL_MODULE::Terminate
[aspnetcorev2.dll] Initializing logs for 'D:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll'. Process Id: 11104.. File Version: 13.0.19218.0. Description: IIS ASP.NET Core Module V2. Commit: 4a42afc5aea63750638e118560d43db04bd9ccc2.
[aspnetcorev2.dll] Resolving hostfxr parameters for application: '.\Voiago.Web.Host.exe' arguments: '' path: 'D:\home\site\wwwroot\'
[aspnetcorev2.dll] Known dotnet.exe location: ''
[aspnetcorev2.dll] Process path '.\Voiago.Web.Host.exe' is not dotnet, treating application as standalone or portable with bootstrapper
[aspnetcorev2.dll] Checking application.dll at 'D:\home\site\wwwroot\.\Voiago.Web.Host.dll'
[aspnetcorev2.dll] Event Log: 'Application 'D:\home\site\wwwroot\' failed to start. Exception message:
Application DLL was not found at D:\home\site\wwwroot\.\Voiago.Web.Host.dll. Confirm the application dll is present. Single-file deployments are not supported in IIS.' 
End Event Log Message.
[aspnetcorev2.dll] InvalidOperationException 'Application DLL was not found at D:\home\site\wwwroot\.\Voiago.Web.Host.dll. Confirm the application dll is present. Single-file deployments are not supported in IIS.' caught at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\HostFxrResolutionResult.cpp:64 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\HandlerResolver.cpp:68 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\HandlerResolver.cpp:171 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\applicationinfo.cpp:181 
[aspnetcorev2.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\applicationinfo.cpp:96 
[aspnetcorev2.dll] Event Log: 'Failed to start application '/LM/W3SVC/553167786/ROOT', ErrorCode '0x8007023e'.' 
End Event Log Message.
[aspnetcorev2.dll] ASPNET_CORE_GLOBAL_MODULE::OnGlobalConfigurationChange 'MACHINE/WEBROOT/APPHOST/TRAVELGO-DEV-SERVER'
[aspnetcorev2.dll] Stopping application '/LM/W3SVC/553167786/ROOT'
[aspnetcorev2.dll] ASPNET_CORE_GLOBAL_MODULE::OnGlobalStopListening
Answer

https://docs.microsoft.com/en-us/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&tabs=visual-studio#adopt-the-iis-in-process-hosting-model

The in-process hosting model isn't supported for ASP.NET Core apps targeting .NET Framework. There is an error on project template Web.Host when the target framework is net 461.

Answer

Thank you

Showing 1 to 5 of 5 entries