CodeHelper.Tools.VerifyWebsite
1.0.0
dotnet add package CodeHelper.Tools.VerifyWebsite --version 1.0.0
NuGet\Install-Package CodeHelper.Tools.VerifyWebsite -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeHelper.Tools.VerifyWebsite" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodeHelper.Tools.VerifyWebsite --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeHelper.Tools.VerifyWebsite, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CodeHelper.Tools.VerifyWebsite as a Cake Addin #addin nuget:?package=CodeHelper.Tools.VerifyWebsite&version=1.0.0 // Install CodeHelper.Tools.VerifyWebsite as a Cake Tool #tool nuget:?package=CodeHelper.Tools.VerifyWebsite&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeHelper.Tools.VerifyWebsite
CodeHelper.Tools.VerifyWebsite is a lightweight and easy-to-use .NET Tool to verify your user's website by creating a file, and verifying when the file has been copied to the root directory of the website
Info + Question?
Support
You can support the work if you want:
Version
- 1.0.0 : GetVerifyFileInfo, VerifyWebSite
Methods
- WebSiteHelper.GetVerifyFileInfo() : Returns the fileName, fileUrl and fileContent to be copied to the root directory of the doman to verify
- WebSiteHelper.VerifyWebSite(): Returns if the website/domain is verified (true = the file was found and has correct content)
Use of Code
Part 1: Create the verficatonCode
using CodeHelper.Tools.VerifyWebsite;
WebSiteHelper _verifier = new() { WebsiteUrl = "https://thedomain.com" };
//-- Get the fileName, fileUrl and fileContent
var (verifyFileName, verifyFileUrl, verifyContent) = _verifier.GetVerifyFileInfo();
//-- Save the contentCode (which will be needed in the second part )
var _saveVerifyCode = _verifier.VerifyCode; //-- Save this code
//-- Layout (Use the variables to return the information to the user)
Console.WriteLine("Copy a html file to the root of your website");
Console.WriteLine("Filename: " + verifyFileName);
Console.WriteLine("Content: " + verifyContent);
Console.WriteLine(Environment.NewLine);
Console.WriteLine($"Check that {verifyFileUrl} is accessible");
Console.WriteLine($"Click Verify WebSite");
Part 2: The user has copied the file to the root directory of the domain
//-- When user clicks Verif Website
_verifier = new() { WebsiteUrl = "https://thedomain.com", VerifyCode = _saveVerifyCode };
if (await _verifier.VerifyWebSite())
Console.WriteLine("Your website is verified");
else
Console.WriteLine("We could not verify your website");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 219 | 10/24/2022 |