C#




C# Convert Char to Int

Once again I decided to make a new task from LeetCode and finally my process had been stopped. I could not convert Char to Int. I even spent some time for research, but I could not find any solution. Then I open the documentation and started to read.

(read more...)

Allow CORS in Net Core application

It's not for production, but for developer environments

Add the block below to Program.cs. I talk about Net Core 5 or Net Core 6 application.

 // global cors policy
            app.UseCors(x => x
                .AllowAnyMethod()
                .AllowAnyHeader()
                .SetIsOriginAllowed(origin => true) // allow any origin
                .AllowCredentials()); // allow credentials

MarkiMarta.com. Notes of web-specialist
Since 2009
18+