User297458589 posted
I have recently deployed my web app to IIS. However, I can't even run it. When I do a dotnet SDR_Administrator.Web.dll, this error appears:
Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: path at System.IO.Directory.CreateDirectory(String path) at SDR_Administrator.Web.Startup.ConfigureServices(IServiceCollection service s) in D:\a\1\s\SDR_Administrator.Web\Startup.cs:line
48 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(ISer viceCollection services) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at SDR_Administrator.Web.Program.BuildWebHost(String[] args) in D:\a\1\s\SDR_ Administrator.Web\Program.cs:line 43 at SDR_Administrator.Web.Program.Main(String[]
args) in D:\a\1\s\SDR_Administ rator.Web\Program.cs:line 27
The lines 48 in the Startup.cs is this line:
var keyringPath = Environment.GetEnvironmentVariable(SDR_Core.Web.ClassLibrary.Globals.ConfigurationGlobals.KeyStorage);
System.IO.Directory.CreateDirectory(keyringPath);
When I finish my deployment, I can see that the web.config file is populated correctly with all the required variables with this as an example:
<environmentVariable name="STORAGE" value="C:\Data" />
I'm stuck on this section. What else am I missing?