We have 2 docker containers, 1 each for identity server and another for an application. I am able to authorize the swagger page but when I execute an end-point in the swagger page, I see Internal Server 500 error.
Below is the response while using edge dev-tools: Status 500 while SetCsrfCookie //initiator abp.swagger.js
Request URL: https://mydomainname:8080/abp/Swashbuckle/SetCsrfCookie
Request Method: GET
Status Code: 500
Remote Address: 10.0.0.3:8080
Referrer Policy: strict-origin-when-cross-origin
Status 500 while calling https://mydomainname:8080/api/entity-name/entityname //initiator swagger-ui-bundle.js:2
Following error from container:
[INF] Request starting HTTP/2 GET https://mydomainname:8080/abp/Swashbuckle/SetCsrfCookie - -
[ERR] Exception occurred while processing message.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
Now I tried the below things after following a couple of suggestions:
- Put both containers in same network in docker using --network.
- Give network alias using --network-alias.
The problem I understand is that the application container cannot resolve the internal domain to itself.
The SetCsrfCookie method is not found at mydomainname:8080. What I figure we need to do is to make sure the container is able to resolver mydomainname:8080 to itself, whose ip addr is 172.18.0.4.
I tried --add-host, --network-alias etc while running the container. Currently we're resolving request to VM 10.0.0.3 (that has the container) to mydomainname by using the hosts file in our machine.
The issue i figure is when the container in the vm trying to resolve mydomainname to itself. How can we solve this?
Thank you