I try to run .exe file that is a console application. Normally it works fine but when I use schedule task on windows, it gives "The ConnectionString property has not been initialized" erorr. Any suggestion?
CodePudding user response:
The problem might be related to current directory in which the application run. Windows Task Scheduler runs ,by default, applications under c:\windows\System32 directory. The location of appsettings.json might be missing.
You can fix by providing "Start In" parameter which must be directory of appsettings.json as shown below.