I have been doing database administration and have been asked several times to reduce the size of database files. The actual mdf file is small, 3MB, but the LDF file is 10GB !! I have read about the DBCC SHRINKFILE command and tried this, but the file has stayed at 10GB even though it said the command executed fine. I've also tried using the wizard in SQL Server to reduce the LDF to a specified file size (800MB), this also failed to change the size even though it gave me the impression it had worked and was successful via the wizard. The best thing I found is to change the recovery mode of database to RECOVERY SIMPLE before executing the SHRINKFILE command. After that change back the recovery mode to FULL . ALTER DATABASE ExampleDB SET RECOVERY SIMPLE DBCC SHRINKFILE('ExampleDB_log', 0, TRUNCATEONLY) ALTER DATABASE ExampleDB SET RECOVERY FULL Happy Coding :)
Configuring CORS in IIS - Response to preflight request doesn't pass access control check: It does not have HTTP ok status
The Access-Control-Allow-Origin Header Explained – With a CORS Example Often times when calling an API, you may see an error in your console that looks like this: Access to fetch at 'http://somesite.com' from origin 'http://yoursite.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value that is not equal to the supplied origin Add following in <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Methods" value="*" /> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="*" /> </customHeaders> </system.webServer> After adding the above code in web.config, received the following error in response. .... Has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: