With a few extra steps you can run BaGet Extension behind a Windows IIS proxy. This has many benefits, including automatic restarts on reboots.
dotnet publish generates the web.config.C:\Inetpub\wwwroot\BaGetUsing IIS Manager, create a new Application Pool:
BaGetAppPool (can be whatever you want)BaGetAppPool as the application poollocalhost:6060) in appsettings.json is not used.You may need to give special permissions to the top-level BaGet Extension folder so that the app can persist its state. This is necessary as the Application Pools’ identity is a virtual account that isn’t recognized by the Windows User Management Console. For more information, please refer to ASP.NET Core’s documentation:
!!! info Virtual Directories do not work with IIS and Kestrel. For more information, please refer to ASP.NET Core’s documentation.
Ensure that the configuration’s storage Path has the appropriate forward slashes:
...
"Storage": {
"Type": "FileSystem",
"Path": "C://AnotherFolder/Packages"
},
...
Note that you will need to adjust folder permissions if the Path is created outside of the BaGet Extension top-level directory. See the BaGet Extension Folder Permissions.
With an empty ApiKey and accounts on (the default), a push needs a user API key from /account/apikeys; or set ApiKey and pass it with -k. See Require an API key.
logs/baget-YYYYMMDD.log under the site folder; give the application pool identity write access to it (see
folder permissions) or point Serilog:WriteTo:File:Args:path at a writable folder.
A file that cannot be written is reported on stderr (enable stdoutLogEnabled in web.config to capture it), not silently dropped..NET Runtime),
without administrator rights. Turn that off with Serilog:EventLog:Enabled=false.Serilog:WriteTo:File:Enabled to false (do not rely on an empty environment variable).
See Logging.Settings such as the maximum package size can be configured for IIS in the appsettings.json file - see IIS Server Options.