sun0555
Posts: 2
Joined: Wed Oct 12, 2016 10:41 am

Unable to run the dotnet service

Hi Team,

i have created the service for dotnet exe in advanced installer. but it is unable start the service due to below error in event viewer.

Application: Server.Host.exe
CoreCLR Version: 4.6.28207.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The physical path is 'C:\Windows\system32\appsettings.json'.
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()

but the appsettings.json exist in APPDIR but it is searching in "C:\Windows\system32"

can you have look into it.

Thanks In Advance.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Unable to run the dotnet service

Hello,

From what I see here, this behavior is all handled by your service executable.
Exception Info: System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The physical path is 'C:\Windows\system32\appsettings.json'.
It looks like your executable is expecting the JSON file in the system32 folder.

I'm not quite sure if there is much we can do here, besides copying the JSON file in the expected location (e.g. system32 folder).

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”