This article assumes you are on windows and you’d like to expose the OrigamServer website on port 5000.
Find out what your ip address is
on windows run:
ipconfig
Note your local ip address. Let’s say it is 192.168.0.165
Modify launchSettings.json
Add the ip address and port to "applicationUrl"
{
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:56422",
"sslPort": 44357
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Origam.ServerCore": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44357;http://localhost:5001;https://192.168.0.165:5000"
}
}
}
Add a firewall rule
Run this command in cmd as administrator:
netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=5000 profile=private remoteip=localsubnet action=allow
Edit appsettings.json
Add RedirectUri
and Url
.
...
"urls": "https://192.168.0.165:5000;...
...
"IdentityServerConfig": {
...
"WebClient": {
"RedirectUris": [
"https://192.168.0.165:5000/#origamClientCallback/",
...
Edit applicationhost.config
This may not be necessary. But in case the above is not working you can try this too.
Open the file located here: origam\backend\.vs\Origam\config\applicationhost.config
Scroll down till you see site name="Origam.ServerCore"
and add the binding
element as shown below.
...
<site name="Origam.ServerCore" id="3">
<application path="/" applicationPool="Origam.ServerCore AppPool">
<virtualDirectory path="/" physicalPath="C:\Repos\origam\backend\Origam.Server" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:56422:localhost" />
<binding protocol="https" bindingInformation="*:44357:localhost" />
<binding protocol="https" bindingInformation="*:5000:192.168.0.165" />
</bindings>
</site>
...