Add the following to the system.webServer/rewrite/rules node in your web.config. If your local development host differs from localhost:4200, replace the HTTP_ORIGIN input accordingly.

<rule name="Allow CORS preflight OPTION request on 2sxc routes" stopProcessing="true">
    <match url="/2sxc/" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_ORIGIN}" pattern="(http(s)?://((.+\.)?localhost:4200))" />
<add input="{REQUEST_METHOD}" pattern="OPTIONS" />
</conditions>
<action type="CustomResponse" statusCode="200" subStatusCode="0" statusReason="OK" statusDescription="OK" />
</rule>