diff --git a/samples/RecaptchaMVCSample/App_Start/FilterConfig.cs b/samples/RecaptchaMVCSample/App_Start/FilterConfig.cs index 8c7bfbb..a1c4935 100644 --- a/samples/RecaptchaMVCSample/App_Start/FilterConfig.cs +++ b/samples/RecaptchaMVCSample/App_Start/FilterConfig.cs @@ -1,4 +1,9 @@ -using System.Web; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System.Web; using System.Web.Mvc; namespace RecaptchaMVCSample diff --git a/samples/RecaptchaMVCSample/App_Start/RouteConfig.cs b/samples/RecaptchaMVCSample/App_Start/RouteConfig.cs index cff2e3f..f698d48 100644 --- a/samples/RecaptchaMVCSample/App_Start/RouteConfig.cs +++ b/samples/RecaptchaMVCSample/App_Start/RouteConfig.cs @@ -1,4 +1,9 @@ -using System; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System; using System.Collections.Generic; using System.Linq; using System.Web; diff --git a/samples/RecaptchaMVCSample/App_Start/WebApiConfig.cs b/samples/RecaptchaMVCSample/App_Start/WebApiConfig.cs index af7cc71..4122b67 100644 --- a/samples/RecaptchaMVCSample/App_Start/WebApiConfig.cs +++ b/samples/RecaptchaMVCSample/App_Start/WebApiConfig.cs @@ -1,4 +1,8 @@ -using System; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ +using System; using System.Collections.Generic; using System.Linq; using System.Web.Http; diff --git a/samples/RecaptchaMVCSample/Controllers/HomeController.cs b/samples/RecaptchaMVCSample/Controllers/HomeController.cs index 42c6e59..c7f0bef 100644 --- a/samples/RecaptchaMVCSample/Controllers/HomeController.cs +++ b/samples/RecaptchaMVCSample/Controllers/HomeController.cs @@ -23,7 +23,7 @@ public ActionResult Index() } [HttpPost] - public async Task Index(UserRegistrationModel model) + public ActionResult Index(UserRegistrationModel model) { var recaptchaHelper = this.GetRecaptchaVerificationHelper(); @@ -33,7 +33,7 @@ public async Task Index(UserRegistrationModel model) return View(model); } - var recaptchaResult = await recaptchaHelper.VerifyRecaptchaResponseTaskAsync(); + var recaptchaResult = recaptchaHelper.VerifyRecaptchaResponse(); if (recaptchaResult != RecaptchaVerificationResult.Success) { diff --git a/samples/RecaptchaMVCSample/Global.asax.cs b/samples/RecaptchaMVCSample/Global.asax.cs index d79e1b7..aaa1409 100644 --- a/samples/RecaptchaMVCSample/Global.asax.cs +++ b/samples/RecaptchaMVCSample/Global.asax.cs @@ -1,4 +1,9 @@ -using System; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -8,8 +13,6 @@ namespace RecaptchaMVCSample { - // Note: For instructions on enabling IIS6 or IIS7 classic mode, - // visit http://go.microsoft.com/?LinkId=9394801 public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() diff --git a/samples/RecaptchaMVCSample/Models/UserRegistrationModel.cs b/samples/RecaptchaMVCSample/Models/UserRegistrationModel.cs index f0459a2..c2562ae 100644 --- a/samples/RecaptchaMVCSample/Models/UserRegistrationModel.cs +++ b/samples/RecaptchaMVCSample/Models/UserRegistrationModel.cs @@ -1,4 +1,9 @@ -using System; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/samples/RecaptchaMVCSample/Properties/AssemblyInfo.cs b/samples/RecaptchaMVCSample/Properties/AssemblyInfo.cs index cd3e67a..8d34825 100644 --- a/samples/RecaptchaMVCSample/Properties/AssemblyInfo.cs +++ b/samples/RecaptchaMVCSample/Properties/AssemblyInfo.cs @@ -1,4 +1,9 @@ -using System.Reflection; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,5 +36,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.8.0.0")] -[assembly: AssemblyFileVersion("1.8.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/samples/RecaptchaMVCSample/RecaptchaMVCSample.csproj b/samples/RecaptchaMVCSample/RecaptchaMVCSample.csproj index e0bcbfb..cdd4ac9 100644 --- a/samples/RecaptchaMVCSample/RecaptchaMVCSample.csproj +++ b/samples/RecaptchaMVCSample/RecaptchaMVCSample.csproj @@ -44,16 +44,12 @@ - - False - ..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll - - + False - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.0\lib\net45\System.Net.Http.Formatting.dll + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll @@ -63,35 +59,35 @@ False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.Helpers.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll - + False - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.0\lib\net45\System.Web.Http.dll + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll - + False - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.0\lib\net45\System.Web.Http.WebHost.dll + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll - + False - ..\packages\Microsoft.AspNet.Mvc.5.2.0\lib\net45\System.Web.Mvc.dll + ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll False - ..\packages\Microsoft.AspNet.Razor.3.2.0\lib\net45\System.Web.Razor.dll + ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.Deployment.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.Razor.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll diff --git a/samples/RecaptchaMVCSample/Views/Home/Index.cshtml b/samples/RecaptchaMVCSample/Views/Home/Index.cshtml index 6c04f8c..f6c8f1d 100644 --- a/samples/RecaptchaMVCSample/Views/Home/Index.cshtml +++ b/samples/RecaptchaMVCSample/Views/Home/Index.cshtml @@ -1,4 +1,11 @@ -@{ +@* +* ============================================================================================================================ +* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT +* LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +* =========================================================================================================================== +*@ + +@{ Layout = "~/Views/Shared/_Layout.cshtml"; } diff --git a/samples/RecaptchaMVCSample/Views/Home/Welcome.cshtml b/samples/RecaptchaMVCSample/Views/Home/Welcome.cshtml index 79bb1f3..83a4608 100644 --- a/samples/RecaptchaMVCSample/Views/Home/Welcome.cshtml +++ b/samples/RecaptchaMVCSample/Views/Home/Welcome.cshtml @@ -1,4 +1,11 @@ -@{ +@* + * ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== +*@ + +@{ Layout = "~/Views/Shared/_Layout.cshtml"; } diff --git a/samples/RecaptchaMVCSample/Views/Shared/_Layout.cshtml b/samples/RecaptchaMVCSample/Views/Shared/_Layout.cshtml index 84071db..126c2cd 100644 --- a/samples/RecaptchaMVCSample/Views/Shared/_Layout.cshtml +++ b/samples/RecaptchaMVCSample/Views/Shared/_Layout.cshtml @@ -1,4 +1,11 @@ -@{ +@* + * ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== +*@ + +@{ Layout = null; } diff --git a/samples/RecaptchaMVCSample/Web.config b/samples/RecaptchaMVCSample/Web.config index 3cafe63..c2d5000 100644 --- a/samples/RecaptchaMVCSample/Web.config +++ b/samples/RecaptchaMVCSample/Web.config @@ -1,8 +1,10 @@  + * ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== +--> @@ -10,10 +12,12 @@ - + - + + + @@ -50,32 +54,32 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/samples/RecaptchaMVCSample/packages.config b/samples/RecaptchaMVCSample/packages.config index c4223d6..65aa0a4 100644 --- a/samples/RecaptchaMVCSample/packages.config +++ b/samples/RecaptchaMVCSample/packages.config @@ -1,13 +1,18 @@  + - - - - - - - + + + + + + + - - + \ No newline at end of file diff --git a/samples/RecaptchaWebFormSample/Default.aspx b/samples/RecaptchaWebFormSample/Default.aspx index 1ca7a20..5f09e1f 100644 --- a/samples/RecaptchaWebFormSample/Default.aspx +++ b/samples/RecaptchaWebFormSample/Default.aspx @@ -1,4 +1,10 @@ -<%@ Page Language="C#" Async="true" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RecaptchaWebFormSample.Default" %> + +<%@ Page Language="C#" Async="true" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RecaptchaWebFormSample.Default" %> <%@ Register Assembly="Recaptcha.Web" Namespace="Recaptcha.Web.UI.Controls" TagPrefix="cc1" %> diff --git a/samples/RecaptchaWebFormSample/Default.aspx.cs b/samples/RecaptchaWebFormSample/Default.aspx.cs index 8e30030..0e8dcba 100644 --- a/samples/RecaptchaWebFormSample/Default.aspx.cs +++ b/samples/RecaptchaWebFormSample/Default.aspx.cs @@ -20,7 +20,7 @@ protected void Page_Load(object sender, EventArgs e) } - protected async void btnSubmit_Click(object sender, EventArgs e) + protected void btnSubmit_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(Recaptcha1.Response)) { @@ -28,7 +28,7 @@ protected async void btnSubmit_Click(object sender, EventArgs e) } else { - RecaptchaVerificationResult result = await Recaptcha1.VerifyTaskAsync(); + RecaptchaVerificationResult result = Recaptcha1.Verify(); if (result == RecaptchaVerificationResult.Success) { diff --git a/samples/RecaptchaWebFormSample/Properties/AssemblyInfo.cs b/samples/RecaptchaWebFormSample/Properties/AssemblyInfo.cs index c15ecc7..ec35b36 100644 --- a/samples/RecaptchaWebFormSample/Properties/AssemblyInfo.cs +++ b/samples/RecaptchaWebFormSample/Properties/AssemblyInfo.cs @@ -1,4 +1,9 @@ -using System.Reflection; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -31,5 +36,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.8.0.0")] -[assembly: AssemblyFileVersion("1.8.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/samples/RecaptchaWebFormSample/RecaptchaWebFormSample.csproj b/samples/RecaptchaWebFormSample/RecaptchaWebFormSample.csproj index 3f51a86..4b83a57 100644 --- a/samples/RecaptchaWebFormSample/RecaptchaWebFormSample.csproj +++ b/samples/RecaptchaWebFormSample/RecaptchaWebFormSample.csproj @@ -58,27 +58,27 @@ False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.Helpers.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll - + False - ..\packages\Microsoft.AspNet.Mvc.5.2.0\lib\net45\System.Web.Mvc.dll + ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll False - ..\packages\Microsoft.AspNet.Razor.3.2.0\lib\net45\System.Web.Razor.dll + ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.Deployment.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll False - ..\packages\Microsoft.AspNet.WebPages.3.2.0\lib\net45\System.Web.WebPages.Razor.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll diff --git a/samples/RecaptchaWebFormSample/Web.config b/samples/RecaptchaWebFormSample/Web.config index 9a02a33..29cc137 100644 --- a/samples/RecaptchaWebFormSample/Web.config +++ b/samples/RecaptchaWebFormSample/Web.config @@ -1,32 +1,36 @@  + * ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * ============================================================================================================================ +--> - + - + + + - - + + - - + + - - + + - - + + diff --git a/samples/RecaptchaWebFormSample/Welcome.aspx b/samples/RecaptchaWebFormSample/Welcome.aspx index 976efa9..d3a3a5b 100644 --- a/samples/RecaptchaWebFormSample/Welcome.aspx +++ b/samples/RecaptchaWebFormSample/Welcome.aspx @@ -1,4 +1,10 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Welcome.aspx.cs" Inherits="RecaptchaWebFormSample.Welcome" %> + +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Welcome.aspx.cs" Inherits="RecaptchaWebFormSample.Welcome" %> diff --git a/samples/RecaptchaWebFormSample/packages.config b/samples/RecaptchaWebFormSample/packages.config index c5cad21..5204042 100644 --- a/samples/RecaptchaWebFormSample/packages.config +++ b/samples/RecaptchaWebFormSample/packages.config @@ -1,7 +1,13 @@  + - - - + + + \ No newline at end of file diff --git a/src/Recaptcha.Web.4.0/Properties/AssemblyInfo.cs b/src/Recaptcha.Web.4.0/Properties/AssemblyInfo.cs index ff224f7..aef3598 100644 --- a/src/Recaptcha.Web.4.0/Properties/AssemblyInfo.cs +++ b/src/Recaptcha.Web.4.0/Properties/AssemblyInfo.cs @@ -1,4 +1,9 @@ -using System.Reflection; +/* ============================================================================================================================ + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * =========================================================================================================================== */ + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -32,5 +37,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.8.0.0")] -[assembly: AssemblyFileVersion("1.8.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/src/Recaptcha.Web.4.0/Recaptcha.Web.4.0.csproj b/src/Recaptcha.Web.4.0/Recaptcha.Web.4.0.csproj index cb69307..666bfba 100644 --- a/src/Recaptcha.Web.4.0/Recaptcha.Web.4.0.csproj +++ b/src/Recaptcha.Web.4.0/Recaptcha.Web.4.0.csproj @@ -39,41 +39,39 @@ true - - + Recaptcha.pfx True ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + ..\packages\Newtonsoft.Json.7.0.1\lib\net40\Newtonsoft.Json.dll + True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll + ..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.Helpers.dll True - ..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll - - - True - ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll + ..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll + ..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.dll True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll + ..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Deployment.dll True - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll + ..\packages\Microsoft.AspNet.WebPages.2.0.30506.0\lib\net40\System.Web.WebPages.Razor.dll @@ -82,12 +80,24 @@ + + IRecaptchaHtmlHelper.cs + Mvc\RecaptchaMvcExtensions.cs + + Recaptcha2HtmlHelper.cs + + + Recaptcha2VerificationResult.cs + RecaptchaHtmlHelper.cs + + RecaptchaHtmlHelperBase.cs + RecaptchaKeyHelper.cs @@ -110,6 +120,7 @@ +