Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Friday, 26 June 2020

Solution to the CORS issue

CORS:Cross-Origin Resource Sharing

In the web.config file, add the following:


<system.webServer>
   <httpProtocol>
     <customHeaders>
        <add name="access-control-allow-origin" value="*" />
        <add name="access-control-allow-headers" value="content-type" />
     </customHeaders>
   </httpProtocol>
</system.webServer>  
Enable anonymous authentication 
    <anonymousAuthentication enabled="true"/>

How to use User-secret to protect secrets in dotnet application.

    Using user secrets in a .NET Web API project to securely manage your database password is an excellent practice. It keeps sensitive info...