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"/>

Generate SQL script from entity framework using powershell/visual studio

to run the below command , start PowerShell in visual studio. Select the database project. In PowerShell:   Script-Migration this command wi...