TomRh Note the version is 0.1.0, definitely NOT production level code... Spent 2 days reverse engineering the install docs till I got it mostly working, but yeah, looks nice, but definitely BETA.
So try this:
- (Likely your issue) Download and install the ASP.NET core 5.0 (not the latest 6.0 the doc sends you to) web hosting, found https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-5.0.13-windows-hosting-bundle-installer
- (Needed for rewrite rules in web.config below) Download and install https://www.iis.net/downloads/microsoft/url-rewrite
- Copy the WebConsole folder to c:\inetpub
- If you want to use port 80/443, you can simply replace the contents of c:\inetpub\wwwroot
- You can also put the folder anywhere else for that matter
- Copy the WebApi folder to c:\inetpub (or other location)
- There are 2 folders: the tree should look like C:\inetpub\WebApi & C:\inetpub\webconsole
- Create an account that has (at least) read access to the database (although I used the Orch Service Account, so it had all the required permissions already)
- Run the PowerShell script 2x (1 for the WebConsole, 1 for the WebAPI)
- Make sure you're using the account from previous step
- For the WebAPI, I would recommend you use the default port 5001 just in case something else is screwy. For the webconsole, you can use port 80.
- Actually, I would recommend that instead of the script you follow the manual process to create the web applications.
- In the WebConsole\assets\configuration.json file, replace the webUri with "http://<ServerFQDN>:5001" (change the port if you didn't use the 5001 port for the WebAPI)
- Open your firewall rules to allow inbound TCP to your WebConsole AND WebAPI from your possible clients PCs
- Replace the WebApi\web.config with the following file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Credentials" value="true" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PATCH, OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>
<rewrite>
<outboundRules>
<clear />
<rule name="AddCrossDomainHeader">
<match serverVariable="RESPONSE_Access_Control_Allow_Origin" pattern=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{HTTP_ORIGIN}" pattern="(http(s)?:\/\/.*)" />
</conditions>
<action type="Rewrite" value="{C:0}" />
</rule>
</outboundRules>
</rewrite>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Orchestrator.WebApi.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
<environmentVariable name="Database__Database" value="Orchestrator" />
<environmentVariable name="Database__Trusted_Connection" value="true" />
<environmentVariable name="Database__Address" value="***DBSERVERNAME***" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 2b28e03a-bff3-4fa9-98ee-fd2db7d151d6-->
- For some added level of security, you may want to change the regex at line 18 with something to match all the possible clients (eg: PCs) that may access the webconsole (I have in mine but of course, that's confidential
). - If you do, then replace the ".*" with "(<regex>|localhost)" so you can keep on accessing it from the localhost using localhost AND from other computers in the network.
- Do NOT put the quotes
- DO put the parenthesis
- Reference: Stack Overflow: https://stackoverflow.com/questions/17323350/access-control-allow-origin-with-multiple-domains
- Replace line 30 with your DB name
- Replace line 32 with your actual DB Server name/alias.
...OK, I think that's sufficient for the time being. For troubleshooting:
- Use the Application Event Log for the WebAPI
- Open the client's Browser Console (F12) to look at the WebConsole errors
HTH
Molish How can you release something when there can only be 1 hardcoded client (IP/Hostname) that can actually use the Web Console, as per the design provided because of the Allow-Origin. See Stack Overflow above for more info