Skip to content

Commit

Permalink
Just test the GoogleRecaptchaWebForms library.
Browse files Browse the repository at this point in the history
  • Loading branch information
1001binary committed Mar 30, 2015
1 parent bd601cb commit 8c14a3a
Show file tree
Hide file tree
Showing 57 changed files with 392 additions and 87 deletions.
20 changes: 20 additions & 0 deletions GoogleRecaptcha.WebForms/Default.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GoogleRecaptcha.WebForms.Default" %>
<%@ Register TagPrefix="asp" Namespace="GoogleRecaptchaWebForms" Assembly="GoogleRecaptchaWebForms" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="frm" runat="server">
<div>
<asp:RecaptchaV2Control SiteKey="6LeF-QMTAAAAAPBTi98JAMFTF1lBzKrbyCri0JB_" SecretKey="6LeF-QMTAAAAAOw8M2RTtxoY6ifOhhUb4GlXpdB3" runat="server"/>
</div>
<asp:Button ID="btnVerify" runat="server" Text="Submit" OnClick="btnVerify_OnClick"/>
</form>

<script src='https://www.google.com/recaptcha/api.js'></script>
</body>
</html>
20 changes: 20 additions & 0 deletions GoogleRecaptcha.WebForms/Default.aspx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace GoogleRecaptcha.WebForms
{
using System;

public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//TODO: write code here
}

protected void btnVerify_OnClick(object sender, EventArgs e)
{
if (Page.IsValid)
{
//TODO: write code here
}
}
}
}
33 changes: 33 additions & 0 deletions GoogleRecaptcha.WebForms/Default.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 119 additions & 0 deletions GoogleRecaptcha.WebForms/GoogleRecaptcha.WebForms.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1559058B-5A7C-42D9-919A-02AD20DE1294}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GoogleRecaptcha.WebForms</RootNamespace>
<AssemblyName>GoogleRecaptcha.WebForms</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="Default.aspx" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GoogleRecaptchaWebForms\GoogleRecaptchaWebForms.csproj">
<Project>{ab33c149-030c-4e2d-b135-36a5f1ff1cc4}</Project>
<Name>GoogleRecaptchaWebForms</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>55017</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:55017/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
28 changes: 28 additions & 0 deletions GoogleRecaptcha.WebForms/GoogleRecaptcha.WebForms.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
35 changes: 35 additions & 0 deletions GoogleRecaptcha.WebForms/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GoogleRecaptcha.WebForms")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GoogleRecaptcha.WebForms")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2b332703-cc0c-439d-a834-1610b856798e")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
30 changes: 30 additions & 0 deletions GoogleRecaptcha.WebForms/Web.Debug.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
31 changes: 31 additions & 0 deletions GoogleRecaptcha.WebForms/Web.Release.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
13 changes: 13 additions & 0 deletions GoogleRecaptcha.WebForms/Web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>

<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>

</configuration>
Binary file not shown.
13 changes: 13 additions & 0 deletions GoogleRecaptcha.WebForms/bin/GoogleRecaptcha.WebForms.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>

<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>

</configuration>
Binary file not shown.
Binary file added GoogleRecaptcha.WebForms/bin/GoogleRecaptcha.dll
Binary file not shown.
Binary file added GoogleRecaptcha.WebForms/bin/GoogleRecaptcha.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptcha.WebForms.dll.config
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptcha.WebForms.dll
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptcha.WebForms.pdb
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptchaWebForms.dll
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptcha.dll
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptchaWebForms.pdb
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\bin\GoogleRecaptcha.pdb
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\obj\Debug\GoogleRecaptcha.WebForms.csprojResolveAssemblyReference.cache
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\obj\Debug\GoogleRecaptcha.WebForms.dll
E:\projects\GoogleRecaptcha\GoogleRecaptcha.WebForms\obj\Debug\GoogleRecaptcha.WebForms.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptcha.WebMvc.dll
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptcha.WebMvc.pdb
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptcha.dll
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptcha.pdb
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptchaMvc.dll
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/bin/GoogleRecaptchaMvc.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified GoogleRecaptcha.WebMvc/obj/Debug/GoogleRecaptcha.WebMvc.dll
Binary file not shown.
Binary file not shown.
16 changes: 11 additions & 5 deletions GoogleRecaptcha.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleRecaptchaMvc", "Googl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleRecaptcha.WebMvc", "GoogleRecaptcha.WebMvc\GoogleRecaptcha.WebMvc.csproj", "{4EEFECD6-E0D1-4A5E-83D3-929CF987CB48}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleRecaptchaWebForms", "GoogleRecaptchaWebForms\GoogleRecaptchaWebForms.csproj", "{8098D635-D169-421B-8264-C4972A1E9AAB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleRecaptchaWebForms", "GoogleRecaptchaWebForms\GoogleRecaptchaWebForms.csproj", "{AB33C149-030C-4E2D-B135-36A5F1FF1CC4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleRecaptcha.WebForms", "GoogleRecaptcha.WebForms\GoogleRecaptcha.WebForms.csproj", "{1559058B-5A7C-42D9-919A-02AD20DE1294}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -29,10 +31,14 @@ Global
{4EEFECD6-E0D1-4A5E-83D3-929CF987CB48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EEFECD6-E0D1-4A5E-83D3-929CF987CB48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EEFECD6-E0D1-4A5E-83D3-929CF987CB48}.Release|Any CPU.Build.0 = Release|Any CPU
{8098D635-D169-421B-8264-C4972A1E9AAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8098D635-D169-421B-8264-C4972A1E9AAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8098D635-D169-421B-8264-C4972A1E9AAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8098D635-D169-421B-8264-C4972A1E9AAB}.Release|Any CPU.Build.0 = Release|Any CPU
{AB33C149-030C-4E2D-B135-36A5F1FF1CC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB33C149-030C-4E2D-B135-36A5F1FF1CC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB33C149-030C-4E2D-B135-36A5F1FF1CC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB33C149-030C-4E2D-B135-36A5F1FF1CC4}.Release|Any CPU.Build.0 = Release|Any CPU
{1559058B-5A7C-42D9-919A-02AD20DE1294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1559058B-5A7C-42D9-919A-02AD20DE1294}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1559058B-5A7C-42D9-919A-02AD20DE1294}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1559058B-5A7C-42D9-919A-02AD20DE1294}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified GoogleRecaptcha.v12.suo
Binary file not shown.
Binary file modified GoogleRecaptcha/bin/Debug/GoogleRecaptcha.dll
Binary file not shown.
Binary file modified GoogleRecaptcha/bin/Debug/GoogleRecaptcha.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified GoogleRecaptcha/obj/Debug/GoogleRecaptcha.dll
Binary file not shown.
Binary file modified GoogleRecaptcha/obj/Debug/GoogleRecaptcha.pdb
Binary file not shown.
Binary file modified GoogleRecaptchaMvc/bin/Debug/GoogleRecaptchaMvc.dll
Binary file not shown.
Binary file modified GoogleRecaptchaMvc/bin/Debug/GoogleRecaptchaMvc.pdb
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8c14a3a

Please sign in to comment.