diff --git a/.vscode/launch.json b/.vscode/launch.json index da9dadb..baca5d9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/contact.dll", + "program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/contact.dll", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": false, diff --git a/Pages/Contact.cshtml b/Pages/Contact.cshtml index a347543..ec17417 100644 --- a/Pages/Contact.cshtml +++ b/Pages/Contact.cshtml @@ -68,6 +68,17 @@ + +
+
+
+ +
+ + +
+
+
@@ -162,8 +173,8 @@

Can I phone someone or have someone phone me?

-

To continue to provide support to service companies around the world that are trialling AyaNova as well as affordable subscription support to those that have purchased AyaNova licenses, we do not provide phone support.

-

Please contact us via the online form above, or send us a direct email to support@ayanova.com and our North American support staff will respond quite quickly between 9:00AM and 5:00PM Pacific Standard Time (-8GMT/ UTC).

+

In order to be able to provide an affordable product for small business with fast technical support globally, we do not provide phone support.

+

Please contact us via the online form above, or send us a direct email to support@ayanova.com and our North American support staff will respond promptly between 9:00AM and 5:00PM Pacific Standard Time (-8GMT/ UTC) Monday to Friday.

diff --git a/Pages/Contact.cshtml.cs b/Pages/Contact.cshtml.cs index c30e98c..9cccb97 100644 --- a/Pages/Contact.cshtml.cs +++ b/Pages/Contact.cshtml.cs @@ -15,23 +15,30 @@ using Microsoft.Extensions.Configuration; namespace contact.Pages { - + [BindProperties(SupportsGet = true)] public class ContactFormModel { + public ContactFormModel() + { + DbId = "n/a v7"; + } [Required] public string Name { get; set; } [Required] public string Company { get; set; } + [BindProperty(SupportsGet = true)] + public string DbId { get; set; } [Required, EmailAddress] public string Email { get; set; } [Required] public string Message { get; set; } + } public class ContactModel : PageModel { public string Message { get; set; } - [BindProperty] + [BindProperty(SupportsGet = true)] public ContactFormModel Contact { get; set; } private readonly IConfiguration _configuration; @@ -71,7 +78,7 @@ namespace contact.Pages private void SendMail() { - var MessageBody = $"Name:\r\n{Contact.Name}\r\n\r\nCompany:\r\n{Contact.Company}\r\n\r\nMessage:\r\n{Contact.Message}"; + var MessageBody = $"Name:\r\n{Contact.Name}\r\n\r\nCompany:\r\n{Contact.Company}\r\n\r\nDatabase Id:\r\n{Contact.DbId}\r\n\r\nMessage:\r\n{Contact.Message}"; //SEND TO US using (var message = new MailMessage()) diff --git a/Pages/Error.cshtml.cs b/Pages/Error.cshtml.cs index d39c8a1..bfc72f1 100644 --- a/Pages/Error.cshtml.cs +++ b/Pages/Error.cshtml.cs @@ -14,7 +14,7 @@ namespace contact.Pages public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + // [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; diff --git a/Pages/request.cshtml b/Pages/request.cshtml deleted file mode 100644 index 90595ca..0000000 --- a/Pages/request.cshtml +++ /dev/null @@ -1,158 +0,0 @@ -@page -@model RequestModel -@{ - ViewData["Title"] = "Request AyaNova 30 day Activation Key"; -} - - -
- -
- -

Try AyaNova for free

-

Receive a 30 day Activation Key via email to fully unlock your AyaNova!

-

Check out features

-
-
-
- - -

 

- - - -
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
- - -
- -
-
- -
-
- -
-
-
-
-
-

The email address you provided will automatically and immediately receive a copy of what you sent to us. If you do not receive, see below for possible resolutions.

-

All of our responses are from real live people, so there could be a delay receiving the key and steps to proceed due to time zone differences, time of day, weekend, or if a holiday long weekend.

-

As soon as we can, we will reply to the email address you provided with 2 email messages - an email from us with links for setup and recommended tutorials, and a second email that contains your specific instructions to fetch and apply your Activation Key to your already downloaded and installed latest version of AyaNova.

-

Do download the AyaNova setup file and install to your desktop, and start checking out AyaNova's service management features by following along with the tutorials!

-

Why do we ask for your name, company name and email address?

-

We use the information you send us to email you your company's temporary Activation Key, to provide sales support and technicial support to you and your company, and to make AyaNova recommendations and suggestions to you and your company. Also refer to our Privacy Policy for more clarity.

- -
-
-
-
- -
-
-
-
-
-

If you have sent a request, but have not received a confirmation email

-

 

-

1. Check the spelling of your email address:

-

Just in case!

-

 

-

2. Confirm that your email address mailbox is not full:

-

Your mailbox may have an email quota. And if email forwarding, do check both the email address originally sent to as well as the email address account being forwarded to.

-

 

-

3. Check your Junk folder:

-

If you find the email(s) from us in your Junk folder, do edit your spam settings so that all email from support@ayanova.com is allowed.

-

 

-

4. Issues with HotMail or AOL accounts:

-

If you have sent an email using a HotMail or AOL account (@@hotmail.com or @@aol.com), although we may receive it and have sent a reply, you may never receive our emails and we will never be advised that it was rejected by HotMail

-

You can also check out these two URL links about why not to use a HotMail account if you actually want to receive email from other's that do not have a HotMail account:

-

http://www.theregister.com/2007/05/01/hotmail_friendly_fire/

-

http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat

-

 

-

5. Your SPAM settings:

-

Your email program or your ISP (Internet Service Provider) is using a spam filter that is filtering out all email from us, or certain email depending on the content.

-

You may need to edit your email program and/or contact your ISP to allow all email from support@ayanova.com

-

Once you have done this, either forward your previous email, or send a new email stating that you did not receive a reply due possibly to a spam filter, and we will resend the information.

-

We are not made aware by your spam filter that the email has not been received by you. The only way is if you confirm the receipt, or contact us again.

-
-
-
-
-
- - - - -
-
-
- Ground Zero Tech-Works Inc., 05 - 3610 Christie Parkway Courtenay, BC V9N 9T6 Canada -
- Since 1999 AyaNova® is a registered trademark of Ground Zero Tech-Works Inc. in the United States and other countries. -
- End User License Agreement | Privacy Policy
-
-
- \ No newline at end of file diff --git a/Pages/request.cshtml.cs b/Pages/request.cshtml.cs deleted file mode 100644 index 15ef3d1..0000000 --- a/Pages/request.cshtml.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.RazorPages; -using System.ComponentModel.DataAnnotations; -using Microsoft.AspNetCore.Mvc; -using System.Net.Mail; -using System.Net; -//for captcha: -using System.Net.Http; -using System.Net.Http.Headers; -using Newtonsoft.Json.Linq; -using Microsoft.Extensions.Configuration; - -namespace contact.Pages -{ - - public class RequestFormModel - { - [Required] - public string Name { get; set; } - [Required] - public string Company { get; set; } - [Required] - public string Referrer { get; set; } - [Required, EmailAddress] - public string Email { get; set; } - [Required] - public string Message { get; set; } - } - - public class RequestModel : PageModel - { - public string Message { get; set; } - [BindProperty] - public RequestFormModel Contact { get; set; } - private readonly IConfiguration _configuration; - public RequestModel(IConfiguration configuration) - { - _configuration = configuration; - } - - public ActionResult OnPost() - { - if (!ModelState.IsValid) - { - return Page(); - } - if (!ReCaptchaPassed( - Request.Form["g-recaptcha-response"], // that's how you get it from the Request object - _configuration.GetSection("GoogleReCaptcha:secret").Value - )) - { - //Return a fail code that will hopefully take us off the spammers list - return StatusCode(500); - } - - SendMail(); - return Redirect("https://ayanova.com/confirmed.htm"); - } - - - private void SendMail() - { - //aspx version: - //m.Body = "Name:\r\n" + edName.Value + "\r\nCompany:\r\n" + edCompany.Value + "\r\nReferrer:\r\n" + edReferrer.Value + "\r\nAdditional:\r\n" + edOther.Value + "\r\nRequested from:\r\n"; - - var MessageBody = $"Name:\r\n{Contact.Name}\r\nCompany:\r\n{Contact.Company}\r\nReferrer:\r\n{Contact.Referrer}\r\nAdditional:\r\n{Contact.Message}"; - - //SEND TO US - using (var message = new MailMessage()) - { - message.To.Add(new MailAddress("support@ayanova.com")); - message.From = new MailAddress(Contact.Email); - message.Subject = $"Request for 30 day temporary AyaNova activation keycode from {Contact.Company}"; - message.Body = MessageBody; - using (var smtpClient = new SmtpClient("mail.ayanova.com")) - { - - smtpClient.Host = "mail.ayanova.com"; - smtpClient.Port = 2525; - smtpClient.UseDefaultCredentials = false; - //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow - smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); - smtpClient.Send(message); - } - } - - //SEND COPY TO CLIENT - using (var message = new MailMessage()) - { - message.To.Add(new MailAddress(Contact.Email)); - message.From = new MailAddress("support@ayanova.com"); - message.Subject = $"Confirmation of Request for 30 day temporary AyaNova activation keycode from {Contact.Company}"; - message.Body = MessageBody; - - using (var smtpClient = new SmtpClient("mail.ayanova.com")) - { - - smtpClient.Host = "mail.ayanova.com"; - smtpClient.Port = 2525; - smtpClient.UseDefaultCredentials = false; - //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow - smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); - smtpClient.Send(message); - } - } - - } - - public void OnGet() - { - Message = "Your contact page."; - } - - public static bool ReCaptchaPassed(string gRecaptchaResponse, string secret) - { - HttpClient httpClient = new HttpClient(); - var res = httpClient.GetAsync($"https://www.google.com/recaptcha/api/siteverify?secret={secret}&response={gRecaptchaResponse}").Result; - if (res.StatusCode != HttpStatusCode.OK) - { - // logger.LogError("Error while sending request to ReCaptcha"); - return false; - } - - string JSONres = res.Content.ReadAsStringAsync().Result; - dynamic JSONdata = JObject.Parse(JSONres); - if (JSONdata.success != "true") - { - return false; - } - - return true; - } - - - } -} diff --git a/Pages/requestlite.cshtml b/Pages/requestlite.cshtml deleted file mode 100644 index 141c5a0..0000000 --- a/Pages/requestlite.cshtml +++ /dev/null @@ -1,158 +0,0 @@ -@page -@model RequestLiteModel -@{ - ViewData["Title"] = "Request AyaNova Lite 30 day Activation Key"; -} - - -
- -
- -

Try AyaNova Lite for free

-

Receive a 30 day Activation Key via email to fully unlock your AyaNova Lite!

-

Check out Lite features

-
-
-
- - -

 

- - - -
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
- -
- - -
-
-
-
- - -
- -
-
- -
-
- -
-
-
-
-
-

The email address you provided will automatically and immediately receive a copy of what you sent to us. If you do not receive, see below for possible resolutions.

-

All of our responses are from real live people, so there could be a delay receiving the key and steps to proceed due to time zone differences, time of day, weekend, or if a holiday long weekend.

-

As soon as we can, we will reply to the email address you provided with 2 email messages - an email from us with links for setup and recommended tutorials, and a second email that contains your specific instructions to fetch and apply your Activation Key to your already downloaded and installed latest version of AyaNova.

-

Do download the AyaNova setup file and install to your desktop, and start checking out AyaNova's service management features by following along with the tutorials!

-

Why do we ask for your name, company name and email address?

-

We use the information you send us to email you your company's temporary Activation Key, to provide sales support and technicial support to you and your company, and to make AyaNova recommendations and suggestions to you and your company. Also refer to our Privacy Policy for more clarity.

- -
-
-
-
- -
-
-
-
-
-

If you have sent a request, but have not received a confirmation email

-

 

-

1. Check the spelling of your email address:

-

Just in case!

-

 

-

2. Confirm that your email address mailbox is not full:

-

Your mailbox may have an email quota. And if email forwarding, do check both the email address originally sent to as well as the email address account being forwarded to.

-

 

-

3. Check your Junk folder:

-

If you find the email(s) from us in your Junk folder, do edit your spam settings so that all email from support@ayanova.com is allowed.

-

 

-

4. Issues with HotMail or AOL accounts:

-

If you have sent an email using a HotMail or AOL account (@@hotmail.com or @@aol.com), although we may receive it and have sent a reply, you may never receive our emails and we will never be advised that it was rejected by HotMail

-

You can also check out these two URL links about why not to use a HotMail account if you actually want to receive email from other's that do not have a HotMail account:

-

http://www.theregister.com/2007/05/01/hotmail_friendly_fire/

-

http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat

-

 

-

5. Your SPAM settings:

-

Your email program or your ISP (Internet Service Provider) is using a spam filter that is filtering out all email from us, or certain email depending on the content.

-

You may need to edit your email program and/or contact your ISP to allow all email from support@ayanova.com

-

Once you have done this, either forward your previous email, or send a new email stating that you did not receive a reply due possibly to a spam filter, and we will resend the information.

-

We are not made aware by your spam filter that the email has not been received by you. The only way is if you confirm the receipt, or contact us again.

-
-
-
-
-
- - - - -
-
-
- Ground Zero Tech-Works Inc., 05 - 3610 Christie Parkway Courtenay, BC V9N 9T6 Canada -
- Since 1999 AyaNova® is a registered trademark of Ground Zero Tech-Works Inc. in the United States and other countries. -
- End User License Agreement | Privacy Policy
-
-
- \ No newline at end of file diff --git a/Pages/requestlite.cshtml.cs b/Pages/requestlite.cshtml.cs deleted file mode 100644 index a1116de..0000000 --- a/Pages/requestlite.cshtml.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.RazorPages; -using System.ComponentModel.DataAnnotations; -using Microsoft.AspNetCore.Mvc; -using System.Net.Mail; -using System.Net; -//for captcha: -using System.Net.Http; -using System.Net.Http.Headers; -using Newtonsoft.Json.Linq; -using Microsoft.Extensions.Configuration; - -namespace contact.Pages -{ - - public class RequestLiteFormModel - { - [Required] - public string Name { get; set; } - [Required] - public string Company { get; set; } - [Required] - public string Referrer { get; set; } - [Required, EmailAddress] - public string Email { get; set; } - [Required] - public string Message { get; set; } - } - - public class RequestLiteModel : PageModel - { - public string Message { get; set; } - [BindProperty] - public RequestFormModel Contact { get; set; } - private readonly IConfiguration _configuration; - public RequestLiteModel(IConfiguration configuration) - { - _configuration = configuration; - } - - public ActionResult OnPost() - { - if (!ModelState.IsValid) - { - return Page(); - } - if (!ReCaptchaPassed( - Request.Form["g-recaptcha-response"], // that's how you get it from the Request object - _configuration.GetSection("GoogleReCaptcha:secret").Value - )) - { - //Return a fail code that will hopefully take us off the spammers list - return StatusCode(500); - } - - SendMail(); - - return Redirect("https://ayanova.com/confirmed.htm"); - } - - - private void SendMail() - { - //aspx version: - //m.Body = "Name:\r\n" + edName.Value + "\r\nCompany:\r\n" + edCompany.Value + "\r\nReferrer:\r\n" + edReferrer.Value + "\r\nAdditional:\r\n" + edOther.Value + "\r\nRequested from:\r\n"; - - var MessageBody = $"Name:\r\n{Contact.Name}\r\nCompany:\r\n{Contact.Company}\r\nReferrer:\r\n{Contact.Referrer}\r\nAdditional:\r\n{Contact.Message}"; - - //SEND TO US - using (var message = new MailMessage()) - { - message.To.Add(new MailAddress("support@ayanova.com")); - message.From = new MailAddress(Contact.Email); - message.Subject = $"Request for 30 day temporary **AyaNova Lite** activation keycode {Contact.Company}"; - message.Body = MessageBody; - using (var smtpClient = new SmtpClient("mail.ayanova.com")) - { - - smtpClient.Host = "mail.ayanova.com"; - smtpClient.Port = 2525; - smtpClient.UseDefaultCredentials = false; - //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow - smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); - smtpClient.Send(message); - } - } - - //SEND COPY TO CLIENT - using (var message = new MailMessage()) - { - message.To.Add(new MailAddress(Contact.Email)); - message.From = new MailAddress("support@ayanova.com"); - message.Subject = $"Confirmation of Request for 30 day temporary **AyaNova Lite** activation keycode for {Contact.Company}"; - message.Body = MessageBody; - - using (var smtpClient = new SmtpClient("mail.ayanova.com")) - { - - smtpClient.Host = "mail.ayanova.com"; - smtpClient.Port = 2525; - smtpClient.UseDefaultCredentials = false; - //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow - smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); - smtpClient.Send(message); - } - } - - } - - public void OnGet() - { - Message = "Your contact page."; - } - - public static bool ReCaptchaPassed(string gRecaptchaResponse, string secret) - { - HttpClient httpClient = new HttpClient(); - var res = httpClient.GetAsync($"https://www.google.com/recaptcha/api/siteverify?secret={secret}&response={gRecaptchaResponse}").Result; - if (res.StatusCode != HttpStatusCode.OK) - { - // logger.LogError("Error while sending request to ReCaptcha"); - return false; - } - - string JSONres = res.Content.ReadAsStringAsync().Result; - dynamic JSONdata = JObject.Parse(JSONres); - if (JSONdata.success != "true") - { - return false; - } - - return true; - } - - - } -} diff --git a/Startup.cs b/Startup.cs index 6cac118..b5be05e 100644 --- a/Startup.cs +++ b/Startup.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + namespace contact { @@ -24,19 +20,21 @@ namespace contact // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.Configure(options => - { - // This lambda determines whether user consent for non-essential cookies is needed for a given request. - options.CheckConsentNeeded = context => true; - options.MinimumSameSitePolicy = SameSiteMode.None; - }); + services.AddControllers().AddNewtonsoftJson(); +services.AddRazorPages(); + // services.Configure(options => + // { + // // This lambda determines whether user consent for non-essential cookies is needed for a given request. + // options.CheckConsentNeeded = context => true; + // options.MinimumSameSitePolicy = SameSiteMode.None; + // }); - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + // services.AddMvc();//.SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { @@ -48,11 +46,18 @@ namespace contact app.UseHsts(); } - // app.UseHttpsRedirection(); + // app.UseHttpsRedirection(); app.UseStaticFiles(); - app.UseCookiePolicy(); + // app.UseCookiePolicy(); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + endpoints.MapRazorPages(); + - app.UseMvc(); + }); + // app.UseMvc(); } } } diff --git a/contact.csproj b/contact.csproj index 4339b91..1d75cce 100644 --- a/contact.csproj +++ b/contact.csproj @@ -1,11 +1,20 @@ - netcoreapp2.1 + netcoreapp3.1 - - + + +