• 大小: 20.34M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 验证码  API  验证  源码  web  

资源简介

webapi实现图形验证码功能,包含两种方式,一种是存取session,一种是redis缓存,源码包含三种类型的图形验证码样式,还有两种方式的验证。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using System.Web.SessionState;

namespace Captcha
{
    public class WebApiApplication : HttpApplication
    {
        /// 
        /// 在处理授权之前,设置Session行为
        /// 

        protected void Application_PostAuthorizeRequest()
        {
            HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Fil

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.    287744  2019-03-21 11:51  Captcha\.vs\Captcha\v15\.suo

     文件          0  2019-03-20 10:49  Captcha\.vs\Captcha\v15\Server\sqlite3\db.lock

     文件    1671168  2019-03-20 17:35  Captcha\.vs\Captcha\v15\Server\sqlite3\storage.ide

     文件      32768  2019-03-21 09:48  Captcha\.vs\Captcha\v15\Server\sqlite3\storage.ide-shm

     文件    4140632  2019-03-21 11:38  Captcha\.vs\Captcha\v15\Server\sqlite3\storage.ide-wal

     文件      83884  2019-03-20 11:37  Captcha\.vs\config\applicationhost.config

     文件       1084  2019-03-20 10:49  Captcha\Captcha\App_Start\BundleConfig.cs

     文件        275  2019-03-20 10:49  Captcha\Captcha\App_Start\FilterConfig.cs

     文件        600  2019-03-20 14:22  Captcha\Captcha\App_Start\RouteConfig.cs

     文件        737  2019-03-20 16:44  Captcha\Captcha\App_Start\WebApiConfig.cs

     文件       1535  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ApiDescriptionExtensions.cs

     文件       6597  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\App_Start\HelpPageConfig.cs

     文件       1942  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\Controllers\HelpController.cs

     文件       2445  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\HelpPage.css

     文件        690  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\HelpPageAreaRegistration.cs

     文件      24534  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\HelpPageConfigurationExtensions.cs

     文件        200  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\CollectionModelDescription.cs

     文件        394  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ComplexTypeModelDescription.cs

     文件        146  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\DictionaryModelDescription.cs

     文件        415  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\EnumTypeModelDescription.cs

     文件        249  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\EnumValueDescription.cs

     文件        263  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\IModelDocumentationProvider.cs

     文件        274  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\KeyValuePairModelDescription.cs

     文件        345  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ModelDescription.cs

     文件      19530  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ModelDescriptionGenerator.cs

     文件        575  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ModelNameAttribute.cs

     文件       1471  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ModelNameHelper.cs

     文件        238  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ParameterAnnotation.cs

     文件        558  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\ParameterDescription.cs

     文件        134  2019-03-20 10:49  Captcha\Captcha\Areas\HelpPage\ModelDescriptions\SimpleTypeModelDescription.cs

............此处省略637个文件信息

评论

共有 条评论