{"id":164,"date":"2022-08-31T07:03:59","date_gmt":"2022-08-31T07:03:59","guid":{"rendered":"https:\/\/dijix.com.ua\/blog\/?p=164"},"modified":"2023-02-25T17:00:13","modified_gmt":"2023-02-25T17:00:13","slug":"generacziya-koda-captcha-v-asp-net-core","status":"publish","type":"post","link":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/","title":{"rendered":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core"},"content":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 Captcha \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043e\u0442 \u0441\u043f\u0430\u043c\u0430, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Google ReCaptcha \u0438 captcha.com. \u041e\u0431\u0430 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f ASP.NET Core. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0432\u044b \u0432\u0441\u0435 \u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 captcha \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 captcha \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 ASP.NET Core.<\/p>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core<\/h2>\n<p><a href=\"#captchawork\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 captcha<\/a><\/p>\n<p><a href=\"#createcaptcha\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 captcha \u0432 ASP.NET Core 6<\/a><\/p>\n<p><a href=\"#createform\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b<\/a><\/p>\n<h2 id=\"captchawork\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 captcha<\/h2>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f <strong>captcha<\/strong> &#8212; \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (\u0446\u0438\u0444\u0440 \u0438 \u0431\u0443\u043a\u0432), \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432 \u0441\u0435\u0441\u0441\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c captcha \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u0432 \u0441\u0435\u0441\u0441\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u043a\u043e\u0434 captcha. \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-165 size-full\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1.jpg\" alt=\"\u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 captcha\" width=\"1275\" height=\"1651\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1.jpg 1236w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1-232x300.jpg 232w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1-791x1024.jpg 791w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1-768x994.jpg 768w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1-1186x1536.jpg 1186w\" sizes=\"auto, (max-width: 1275px) 100vw, 1275px\" \/><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u0435\u0446 captcha \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-166 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1.5.png\" alt=\"\u043e\u0431\u0440\u0430\u0437\u0435\u0446 captcha asp.net core\" width=\"694\" height=\"356\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1.5.png 694w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/1.5-300x154.png 300w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/p>\n<h2 id=\"createcaptcha\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 captcha \u0432 ASP.NET Core 6<\/h2>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0434 captcha, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042f \u043e\u0436\u0438\u0434\u0430\u044e \u043e\u0442 \u0432\u0430\u0441 \u0437\u043d\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 C#. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 .NET Core, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d MVC.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Visual Studio 2022.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u00ab<strong>Asp.Net Core Web Application(.Net Core)\u00bb<\/strong> \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c MVC Template. \u0412 \u0433\u0440\u0430\u0444\u0435 \u201cAuthentication type\u201d, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 None.<\/p>\n<ol>\n<li>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d <strong>System<\/strong><strong>.<\/strong><strong>Drawing<\/strong><strong>.<\/strong><strong>Imaging<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong>NuGet<\/strong>:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true\">Install-Package System.Drawing.Common -Version 4.5.1<\/pre>\n<ol start=\"2\">\n<li>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 captcha \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0439, \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432 ASP.NET Core \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>Program<\/strong><strong>.cs<\/strong>:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true \">builder.Services.AddSession(options =&gt;\r\n{\r\n    options.IdleTimeout = TimeSpan.FromMinutes(20);\r\n    options.Cookie.HttpOnly = true;\r\n});\r\napp.UseSession();\r\n<\/pre>\n<p>3. \u0412 \u043f\u0430\u043f\u043a\u0435 <strong>Model<\/strong>, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <strong>CaptchaResult<\/strong> \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e captcha:<\/p>\n<pre class=\"lang:default decode:true\">public class CaptchaResult\r\n\u00a0\u00a0\u00a0 {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 public string CaptchaCode { get; set; }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 public byte[] CaptchaByteData { get; set; }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 public string CaptchBase64Data =&gt; Convert.ToBase64String(CaptchaByteData);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 public DateTime Timestamp { get; set; }\r\n\u00a0\u00a0\u00a0 }<\/pre>\n<p>4. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <strong>Data<\/strong>, \u0430 \u0432 \u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <strong>Captcha<\/strong> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 captcha:<\/p>\n<pre class=\"lang:default decode:true \">public static class Captcha\r\n    {\r\n        const string Letters = \"2346789ABCDEFGHJKLMNPRTUVWXYZ\";\r\n\r\n        public static string GenerateCaptchaCode()\r\n        {\r\n            Random rand = new Random();\r\n            int maxRand = Letters.Length - 1;\r\n\r\n            StringBuilder sb = new StringBuilder();\r\n\r\n            for (int i = 0; i &lt; 4; i++)\r\n            {\r\n                int index = rand.Next(maxRand);\r\n                sb.Append(Letters[index]);\r\n            }\r\n\r\n            return sb.ToString();\r\n        }\r\n\r\n        public static bool ValidateCaptchaCode(string userInputCaptcha, HttpContext context)\r\n        {\r\n            var isValid = userInputCaptcha == context.Session.GetString(\"CaptchaCode\");\r\n            context.Session.Remove(\"CaptchaCode\");\r\n            return isValid;\r\n        }\r\n\r\n        public static CaptchaResult GenerateCaptchaImage(int width, int height, string captchaCode)\r\n        {\r\n            using (Bitmap baseMap = new Bitmap(width, height))\r\n            using (Graphics graph = Graphics.FromImage(baseMap))\r\n            {\r\n                Random rand = new Random();\r\n\r\n                graph.Clear(GetRandomLightColor());\r\n\r\n                DrawCaptchaCode();\r\n                DrawDisorderLine();\r\n                AdjustRippleEffect();\r\n\r\n                MemoryStream ms = new MemoryStream();\r\n\r\n                baseMap.Save(ms, ImageFormat.Png);\r\n\r\n                return new CaptchaResult { CaptchaCode = captchaCode, CaptchaByteData = ms.ToArray(), Timestamp = DateTime.Now };\r\n\r\n                int GetFontSize(int imageWidth, int captchCodeCount)\r\n                {\r\n                    var averageSize = imageWidth \/ captchCodeCount;\r\n\r\n                    return Convert.ToInt32(averageSize);\r\n                }\r\n\r\n                Color GetRandomDeepColor()\r\n                {\r\n                    int redlow = 160, greenLow = 100, blueLow = 160;\r\n                    return Color.FromArgb(rand.Next(redlow), rand.Next(greenLow), rand.Next(blueLow));\r\n                }\r\n\r\n                Color GetRandomLightColor()\r\n                {\r\n                    int low = 180, high = 255;\r\n\r\n                    int nRend = rand.Next(high) % (high - low) + low;\r\n                    int nGreen = rand.Next(high) % (high - low) + low;\r\n                    int nBlue = rand.Next(high) % (high - low) + low;\r\n\r\n                    return Color.FromArgb(nRend, nGreen, nBlue);\r\n                }\r\n\r\n                void DrawCaptchaCode()\r\n                {\r\n                    SolidBrush fontBrush = new SolidBrush(Color.Black);\r\n                    int fontSize = GetFontSize(width, captchaCode.Length);\r\n                    Font font = new Font(FontFamily.GenericSerif, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);\r\n                    for (int i = 0; i &lt; captchaCode.Length; i++)\r\n                    {\r\n                        fontBrush.Color = GetRandomDeepColor();\r\n\r\n                        int shiftPx = fontSize \/ 6;\r\n\r\n                        float x = i * fontSize + rand.Next(-shiftPx, shiftPx) + rand.Next(-shiftPx, shiftPx);\r\n                        int maxY = height - fontSize;\r\n                        if (maxY &lt; 0) maxY = 0;\r\n                        float y = rand.Next(0, maxY);\r\n\r\n                        graph.DrawString(captchaCode[i].ToString(), font, fontBrush, x, y);\r\n                    }\r\n                }\r\n\r\n                void DrawDisorderLine()\r\n                {\r\n                    Pen linePen = new Pen(new SolidBrush(Color.Black), 3);\r\n                    for (int i = 0; i &lt; rand.Next(3, 5); i++)\r\n                    {\r\n                        linePen.Color = GetRandomDeepColor();\r\n\r\n                        Point startPoint = new Point(rand.Next(0, width), rand.Next(0, height));\r\n                        Point endPoint = new Point(rand.Next(0, width), rand.Next(0, height));\r\n                        graph.DrawLine(linePen, startPoint, endPoint);\r\n\r\n                        \/\/Point bezierPoint1 = new Point(rand.Next(0, width), rand.Next(0, height));\r\n                        \/\/Point bezierPoint2 = new Point(rand.Next(0, width), rand.Next(0, height));\r\n\r\n                        \/\/graph.DrawBezier(linePen, startPoint, bezierPoint1, bezierPoint2, endPoint);\r\n                    }\r\n                }\r\n\r\n                void AdjustRippleEffect()\r\n                {\r\n                    short nWave = 6;\r\n                    int nWidth = baseMap.Width;\r\n                    int nHeight = baseMap.Height;\r\n\r\n                    Point[,] pt = new Point[nWidth, nHeight];\r\n\r\n                    for (int x = 0; x &lt; nWidth; ++x)\r\n                    {\r\n                        for (int y = 0; y &lt; nHeight; ++y)\r\n                        {\r\n                            var xo = nWave * Math.Sin(2.0 * 3.1415 * y \/ 128.0);\r\n                            var yo = nWave * Math.Cos(2.0 * 3.1415 * x \/ 128.0);\r\n\r\n                            var newX = x + xo;\r\n                            var newY = y + yo;\r\n\r\n                            if (newX &gt; 0 &amp;&amp; newX &lt; nWidth)\r\n                            {\r\n                                pt[x, y].X = (int)newX;\r\n                            }\r\n                            else\r\n                            {\r\n                                pt[x, y].X = 0;\r\n                            }\r\n\r\n\r\n                            if (newY &gt; 0 &amp;&amp; newY &lt; nHeight)\r\n                            {\r\n                                pt[x, y].Y = (int)newY;\r\n                            }\r\n                            else\r\n                            {\r\n                                pt[x, y].Y = 0;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    Bitmap bSrc = (Bitmap)baseMap.Clone();\r\n\r\n                    BitmapData bitmapData = baseMap.LockBits(new Rectangle(0, 0, baseMap.Width, baseMap.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);\r\n                    BitmapData bmSrc = bSrc.LockBits(new Rectangle(0, 0, bSrc.Width, bSrc.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);\r\n\r\n                    int scanline = bitmapData.Stride;\r\n\r\n                    IntPtr scan0 = bitmapData.Scan0;\r\n                    IntPtr srcScan0 = bmSrc.Scan0;\r\n\r\n                    unsafe\r\n                    {\r\n                        byte* p = (byte*)(void*)scan0;\r\n                        byte* pSrc = (byte*)(void*)srcScan0;\r\n\r\n                        int nOffset = bitmapData.Stride - baseMap.Width * 3;\r\n\r\n                        for (int y = 0; y &lt; nHeight; ++y)\r\n                        {\r\n                            for (int x = 0; x &lt; nWidth; ++x)\r\n                            {\r\n                                var xOffset = pt[x, y].X;\r\n                                var yOffset = pt[x, y].Y;\r\n\r\n                                if (yOffset &gt;= 0 &amp;&amp; yOffset &lt; nHeight &amp;&amp; xOffset &gt;= 0 &amp;&amp; xOffset &lt; nWidth)\r\n                                {\r\n                                    if (pSrc != null)\r\n                                    {\r\n                                        p[0] = pSrc[yOffset * scanline + xOffset * 3];\r\n                                        p[1] = pSrc[yOffset * scanline + xOffset * 3 + 1];\r\n                                        p[2] = pSrc[yOffset * scanline + xOffset * 3 + 2];\r\n                                    }\r\n                                }\r\n\r\n                                p += 3;\r\n                            }\r\n                            p += nOffset;\r\n                        }\r\n                    }\r\n\r\n                    baseMap.UnlockBits(bitmapData);\r\n                    bSrc.UnlockBits(bmSrc);\r\n                    bSrc.Dispose();\r\n                }\r\n            }\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0411\u0443\u043a\u0432\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0435 \u0432\u0441\u0435 \u0446\u0438\u0444\u0440\u044b \u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u0430\u043b\u0444\u0430\u0432\u0438\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0442\u0440\u0443\u0434\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u043c\u044b. \u042f \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u201c\u0411\u0435\u0437\u044c\u0435\u201d \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>DrawDisorderLine()<\/strong>, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435, \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438\u043d\u0438\u0438 \u0411\u0435\u0437\u044c\u0435.<\/p>\n<ol start=\"5\">\n<li>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 <strong>HomeController<\/strong>, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f captcha:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true\">public IActionResult GetCaptchaImage()\r\n        {\r\n            int width = 100;\r\n            int height = 36;\r\n            var captchaCode = Captcha.GenerateCaptchaCode();\r\n            var result = Captcha.GenerateCaptchaImage(width, height, captchaCode);\r\n            HttpContext.Session.SetString(\"CaptchaCode\", result.CaptchaCode);\r\n            Stream s = new MemoryStream(result.CaptchaByteData);\r\n            return new FileStreamResult(s, \"image\/png\");\r\n        }\r\n<\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 captcha:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-167 size-full\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/2-2.png\" alt=\"\u0432\u044b\u0432\u043e\u0434 captcha asp.net core\" width=\"789\" height=\"612\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/2-2.png 789w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/2-2-300x233.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/2-2-768x596.png 768w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/p>\n<ol start=\"6\">\n<li>Captcha \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c captcha.<\/li>\n<\/ol>\n<h2 id=\"createform\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b<\/h2>\n<ol>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/li>\n<\/ol>\n<ul>\n<li>MailKit<\/li>\n<li>MimeKit<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-168 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/3-1.png\" alt=\"mailkit asp.net core\" width=\"763\" height=\"385\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/3-1.png 763w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/3-1-300x151.png 300w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><\/p>\n<ol start=\"2\">\n<li>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Mailkit<\/strong>, \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>Models<\/strong>, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <strong>SendMessage<\/strong>:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true \">public class SendMessage\r\n    {\r\n        [Required(ErrorMessage = \"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\")]\r\n        public string Title { get; set; }\r\n\r\n        [Required(ErrorMessage = \"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\")]\r\n        public string Description { get; set; }\r\n\r\n        [Required(ErrorMessage = \"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u0434 \u043a\u0430\u043f\u0447\u0438\")]\r\n        [StringLength(4)]\r\n        public string CaptchaCode { get; set; }\r\n    }\r\n<\/pre>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <strong>CaptchaCode<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e captcha \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<ol start=\"3\">\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 <strong>HomeController<\/strong>, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <strong>Email<\/strong>, \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true \">[HttpGet]\r\n        public IActionResult Email()\r\n        {\r\n            return View();\r\n        }\r\n        [HttpPost]\r\n        [AutoValidateAntiforgeryToken]\r\n        public IActionResult Email(SendMessage sendMessage)\r\n        {\r\n            if (ModelState.IsValid)\r\n            {\r\n                \/\/\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0434 \u043a\u0430\u043f\u0447\u0438\r\n                if (!Captcha.ValidateCaptchaCode(sendMessage.CaptchaCode, HttpContext))\r\n                {\r\n                    ModelState.AddModelError(\"CaptchaCode\", \"\u041d\u0435 \u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u0430\u043f\u0447\u0438\");\r\n                    return View(sendMessage);\r\n                }\r\n                var message = new MimeMessage();\r\n                \/\/\u043e\u0442 \u043a\u043e\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\r\n                message.From.Add(new MailboxAddress(\"\u041f\u0438\u0441\u044c\u043c\u043e \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u0441\u0430\u0439\u0442\u0430\", \"mail@gmail.com\"));\r\n                \/\/\u043a\u043e\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\r\n                message.To.Add(new MailboxAddress(\"Admin\", \"admin@gmail.com\"));\r\n                \/\/\u0442\u0435\u043c\u0430 \u043f\u0438\u0441\u044c\u043c\u0430\r\n                message.Subject = sendMessage.Title;\r\n                \/\/\u0442\u0435\u043b\u043e \u043f\u0438\u0441\u044c\u043c\u0430\r\n                message.Body = new TextPart(\"plain\")\r\n                {\r\n                    Text = sendMessage.Description,\r\n                };\r\n\r\n                using (var client = new SmtpClient())\r\n                {\r\n                    \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c smtp \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0447\u0442\u044b \u0438 \u043f\u043e\u0440\u0442\r\n                    client.Connect(\"smtp.gmail.com\", 587, false);\r\n                    \/\/\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439 Email \u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\r\n                    client.Authenticate(\"mail@gmail.com\", \"password\");\r\n                    client.Send(message);\r\n                    client.Disconnect(true);\r\n\r\n                }\r\n                return Content(\"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e!\");\r\n            }\r\n            return View(sendMessage);\r\n        }\r\n<\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c smtp \u0441\u0435\u0440\u0432\u0435\u0440, email \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0412\u0441\u044e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043f\u0440\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; &#171;<a href=\"https:\/\/dijix.com.ua\/blog\/otpravka-email-v-asp-net-core\/\">\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 Email \u0432 Asp.Net Core<\/a>&#171;.<\/p>\n<ol start=\"4\">\n<li>\u0412 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \u2013 <strong>Home<\/strong>, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>Email<\/strong><strong>.<\/strong><strong>cshtml<\/strong>:<\/li>\n<\/ol>\n<pre class=\"lang:default decode:true \">@model WebApplication1.Models.SendMessage\r\n@{\r\n    ViewData[\"Title\"] = \"\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c\";\r\n}\r\n\r\n&lt;div class=\"container col-xxl-8 px-4 py-5\"&gt;\r\n        &lt;div class=\"col-lg-6\"&gt;\r\n            &lt;h1 class=\"display-5 fw-bold lh-1 mb-3\"&gt;\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c&lt;\/h1&gt;\r\n            &lt;div class=\"justify-content-md-start\"&gt;\r\n\r\n                &lt;form method=\"post\" asp-controller=\"Home\" asp-action=\"Email\"&gt;\r\n                    &lt;div asp-validation-summary=\"ModelOnly\"&gt;&lt;\/div&gt;\r\n                    &lt;div class=\"form-group\"&gt;\r\n                        &lt;label asp-for=\"Title\" class=\"control-label\"&gt;&lt;\/label&gt;\r\n                        &lt;input asp-for=\"Title\" class=\"form-control\" \/&gt;\r\n                        &lt;span asp-validation-for=\"Title\" class=\"text-danger\"&gt;&lt;\/span&gt;\r\n                    &lt;\/div&gt;\r\n                    &lt;div class=\"form-group\"&gt;\r\n                        &lt;label asp-for=\"Description\" class=\"control-label\"&gt;&lt;\/label&gt;\r\n                        &lt;textarea asp-for=\"Description\" class=\"form-control\"&gt;&lt;\/textarea&gt;\r\n                        &lt;span asp-validation-for=\"Description\" class=\"text-danger\"&gt;&lt;\/span&gt;\r\n                    &lt;\/div&gt;\r\n                    &lt;div class=\"form-group\"&gt;\r\n                        &lt;div class=\"input-group-prepend\"&gt;\r\n                            &lt;img id=\"img-captcha\" src=\"\/home\/GetCaptchaImage\" \/&gt;\r\n                        &lt;\/div&gt;\r\n                        &lt;input type=\"text\" class=\"form-control\" asp-for=\"CaptchaCode\" maxlength=\"4\" \/&gt;\r\n                        &lt;span asp-validation-for=\"CaptchaCode\" class=\"text-danger\"&gt;&lt;\/span&gt;\r\n                    &lt;\/div&gt;\r\n                    &lt;div class=\"form-group\"&gt;\r\n                        @Html.AntiForgeryToken()\r\n                        &lt;input type=\"submit\" value=\"\u0412\u043e\u0439\u0442\u0438\" class=\"btn btn-primary\" \/&gt;\r\n                    &lt;\/div&gt;\r\n                &lt;\/form&gt;\r\n\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n@await Html.PartialAsync(\"_ValidationScriptsPartial\")\r\n<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"https:\/\/localhost:7221\/home\/email\">https:\/\/localhost:7221\/home\/email<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-170 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/4-1.png\" alt=\"contact form with capcha\" width=\"832\" height=\"686\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/4-1.png 832w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/4-1-300x247.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/4-1-768x633.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 captcha, \u0432\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-169 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/5-1.png\" alt=\"asp.net core \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0441 captcha\" width=\"814\" height=\"682\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/5-1.png 814w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/5-1-300x251.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/5-1-768x643.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0432\u0435\u0434\u0435\u043c \u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-171 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/6-1.png\" alt=\"asp.net core content\" width=\"429\" height=\"260\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/6-1.png 429w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/6-1-300x182.png 300w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 captcha \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043d\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0432\u043d\u0438\u0437\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <strong>Email<\/strong><strong>.<\/strong><strong>cshtml<\/strong>, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>JQuery<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">&lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.6.0\/jquery.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>\u0418 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"lang:default decode:true \">&lt;script&gt;\r\n    $(\"#img-captcha\").click(function () {\r\n    resetCaptchaImage();\r\n});\r\n\r\nfunction resetCaptchaImage() {\r\n    d = new Date();\r\n    $(\"#img-captcha\").attr(\"src\", \"\/home\/GetCaptchaImage?\" + d.getTime());\r\n}\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u044f \u00ab\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core\u00bb, \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u043a \u043a\u043e\u043d\u0446\u0443, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<p>\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a \u0432\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u043a\u043e\u0434 captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445?<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"IXWSiVwLFb\"><p><a href=\"https:\/\/dijix.com.ua\/blog\/kak-opublikovat-prilozhenie-asp-net-core\/\">\u041a\u0430\u043a \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Asp.Net Core<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u00ab\u041a\u0430\u043a \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Asp.Net Core\u00bb &#8212; Dijix -  \u0411\u043b\u043e\u0433\" src=\"https:\/\/dijix.com.ua\/blog\/kak-opublikovat-prilozhenie-asp-net-core\/embed\/#?secret=GFZGSZbHxW#?secret=IXWSiVwLFb\" data-secret=\"IXWSiVwLFb\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u0412\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0447\u0435\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430 C#?<\/p>\n<p>\u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430\u0448 \u0442\u0435\u0441\u0442 \u043d\u0430 13 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435!<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">    <div class=\"container23\">\r\n      <h1>C# Braincheck<\/h1>\r\n      <p id=\"question\"><\/p>\r\n      <form id=\"quiz-form\" class=\"form-quiz\">\r\n\t\t\t\t\t<label class=\"label-quiz\">\r\n          <input type=\"radio\" name=\"answer\" value=\"0\">\r\n          <span id=\"answer-0\"><\/span>\r\n        <\/label>\r\n        <label class=\"label-quiz\">\r\n          <input type=\"radio\" name=\"answer\" value=\"1\">\r\n          <span id=\"answer-1\"><\/span>\r\n        <\/label>\r\n\t\t\t\t<label class=\"label-quiz\">\r\n          <input type=\"radio\" name=\"answer\" value=\"2\">\r\n          <span id=\"answer-2\"><\/span>\r\n        <\/label>\r\n\t\t\t\t<label class=\"label-quiz\">\r\n          <input type=\"radio\" name=\"answer\" value=\"3\">\r\n          <span id=\"answer-3\"><\/span>\r\n        <\/label>\r\n\t\t\t\t <div class=\"btn-div\">\r\n        <button id=\"submit-btn\" class=\"button-quiz\" type=\"submit\">\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439<\/button>\r\n\t\t\t\t<\/div>\r\n      <\/form>\r\n      <div id=\"result\" class=\"mt-3\"><\/div>\r\n    <\/div>\r\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4><strong>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f C#?<\/strong><\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0441\u0430\u0439\u0442\u043e\u0432, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442\u043e\u0432 \u0438 \u0442.\u0434.<\/p>\n<p><a href=\"https:\/\/dijix.com.ua\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-94 size-full\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand.png\" alt=\"\" width=\"355\" height=\"77\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand.png 355w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand-300x65.png 300w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u043d\u0430\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <strong><a href=\"https:\/\/dijix.com.ua\/\">Dijix<\/a>\u00a0<\/strong>\u0438 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043d\u044f\u0442\u0438\u044f\u0445, \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043a \u043e\u0434\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u0412\u0430\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0443, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432\u00a0\u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443<\/li>\n<li>\u0422\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438<\/li>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043a\u043d\u0438\u0433<\/li>\n<li>\u041e\u043d\u043b\u0430\u0439\u043d \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/li>\n<li>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445<\/li>\n<\/ul>\n<blockquote>\n<p style=\"text-align: right;\"><a href=\"https:\/\/dijix.com.ua\/\">https:\/\/dijix.com.ua<\/a><\/p>\n<p style=\"text-align: right;\">\u0416\u0438\u0432\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u043c\u0438\u0440\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0439 \u0432 <a href=\"https:\/\/ms.dijix.com.ua\/\">\u043d\u0430\u0448\u0435\u043c<\/a>.<\/p>\n<\/blockquote>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 Captcha \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435<span class=\"screen-reader-text\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":173,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ru_RU","_original_post":"https:\/\/dijix.com.ua\/blog\/?p=164","footnotes":""},"categories":[8],"tags":[],"class_list":["post-164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net-core","ru-RU","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433<\/title>\r\n<meta name=\"description\" content=\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.\u00a0\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\" \/>\r\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Dijix - \u0411\u043b\u043e\u0433\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Dijixs\" \/>\r\n<meta property=\"article:published_time\" content=\"2022-08-31T07:03:59+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-02-25T17:00:13+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/tingmin_surgeon_research_reading_walking_life_8k_cinematic_b60c4a5e-f255-497f-a9f9-bf3840065137.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"609\" \/>\r\n\t<meta property=\"og:image:height\" content=\"609\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u043c\u0438\u043d\u0443\u0442\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\"},\"author\":{\"name\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d\"},\"headline\":\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core\",\"datePublished\":\"2022-08-31T07:03:59+00:00\",\"dateModified\":\"2023-02-25T17:00:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\"},\"wordCount\":669,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\"},\"articleSection\":[\"Asp.Net Core\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\",\"url\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\",\"name\":\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#website\"},\"datePublished\":\"2022-08-31T07:03:59+00:00\",\"dateModified\":\"2023-02-25T17:00:13+00:00\",\"description\":\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/dijix.com.ua\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#website\",\"url\":\"https:\/\/dijix.com.ua\/blog\/\",\"name\":\"Dijix - \u0411\u043b\u043e\u0433\",\"description\":\"\ud83d\udc9c\",\"publisher\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dijix.com.ua\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\",\"name\":\"Dijix - \u0411\u043b\u043e\u0433\",\"url\":\"https:\/\/dijix.com.ua\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png\",\"contentUrl\":\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png\",\"width\":159,\"height\":92,\"caption\":\"Dijix - \u0411\u043b\u043e\u0433\"},\"image\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Dijixs\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d\",\"name\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g\",\"caption\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\"},\"sameAs\":[\"https:\/\/dijix.com.ua\/blog\"],\"url\":\"https:\/\/dijix.com.ua\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433","description":"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/","og_locale":"ru_RU","og_type":"article","og_title":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433","og_url":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/","og_site_name":"Dijix - \u0411\u043b\u043e\u0433","article_publisher":"https:\/\/www.facebook.com\/Dijixs","article_published_time":"2022-08-31T07:03:59+00:00","article_modified_time":"2023-02-25T17:00:13+00:00","og_image":[{"width":609,"height":609,"url":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/tingmin_surgeon_research_reading_walking_life_8k_cinematic_b60c4a5e-f255-497f-a9f9-bf3840065137.png","type":"image\/png"}],"author":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"10 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#article","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/"},"author":{"name":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d"},"headline":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core","datePublished":"2022-08-31T07:03:59+00:00","dateModified":"2023-02-25T17:00:13+00:00","mainEntityOfPage":{"@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/"},"wordCount":669,"commentCount":0,"publisher":{"@id":"https:\/\/dijix.com.ua\/blog\/#organization"},"articleSection":["Asp.Net Core"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/","url":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/","name":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core - Dijix - \u0411\u043b\u043e\u0433","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/#website"},"datePublished":"2022-08-31T07:03:59+00:00","dateModified":"2023-02-25T17:00:13+00:00","description":"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438.\u00a0","breadcrumb":{"@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dijix.com.ua\/blog\/generacziya-koda-captcha-v-asp-net-core\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/dijix.com.ua\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 Captcha \u0432 ASP.NET Core"}]},{"@type":"WebSite","@id":"https:\/\/dijix.com.ua\/blog\/#website","url":"https:\/\/dijix.com.ua\/blog\/","name":"Dijix - \u0411\u043b\u043e\u0433","description":"\ud83d\udc9c","publisher":{"@id":"https:\/\/dijix.com.ua\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dijix.com.ua\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ru-RU"},{"@type":"Organization","@id":"https:\/\/dijix.com.ua\/blog\/#organization","name":"Dijix - \u0411\u043b\u043e\u0433","url":"https:\/\/dijix.com.ua\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png","contentUrl":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png","width":159,"height":92,"caption":"Dijix - \u0411\u043b\u043e\u0433"},"image":{"@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Dijixs"]},{"@type":"Person","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d","name":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g","caption":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430"},"sameAs":["https:\/\/dijix.com.ua\/blog"],"url":"https:\/\/dijix.com.ua\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":6,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"predecessor-version":[{"id":638,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions\/638"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media\/173"}],"wp:attachment":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}