Coding and Gaming
Development Blog Categories (10 Articles)
This article will walk through upgrading to .NET Core 3.0.
Overall, it was pretty smooth, but I did run into 3 big things...
  1. Newtonsoft is depreciated.
    First, have a plan ready for replacing Newtonsoft as it's been replaced. The new recommendation is System.Text.Json.
  2. Second, if you want to continue to use MVC routing you need to add this to the Startup.cs => ConfigureServices function.
    services.AddMvc(option => option.EnableEndpointRouting = false);
  3. Webconfig => hostingModel="inprocess"
    <aspNetCore processPath="dotnet" arguments=".\Website.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    Finally, I lost a lot of time on this good one. After building and deploying, I was having issues on my production server. For some reason, this inprocess hosting model was added and seemed to screw everything up, I still want to see why that isn't working, but for now I've switched it using a setting in the csproj file:
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



If you would like to setup a custom email alias for you or your company, please check out this link first: Custom Email Aliases

This article will go over how to setup SMTP for an automatic email generator.
If I am doing this for a client company, I will first setup their Custom Email Alias (with the link above).
I will setup a wildcard for their domain pointing all emails to their inbox...
However, I will also create a "contact" alias pointing to my own inbox, that way I can setup the Email Alias myself and attach it to my own account.
I will verify this new "contact" email on my Gmail account and set it as NOT an alias.
I will also hardcode all "to" values to my email address.
I will then test their SMTP, test my code to generate an email from their domain, and test their contact form, before finally deleting the "contact" alias which will switch everything back over to the client's inbox, and finally changing any "to" values in the code from my email address to their inbox.

That is really the main point of the article, however, I will also include some sample C# code on how I do this:
using (var SmtpServer = new SmtpClient("smtp.gmail.com")) { var mail = new MailMessage { From = from, Subject = subject, IsBodyHtml = true, Body = htmlBody, }; mail.To.Add(to); // Adjust the Reply To mail.ReplyToList.Clear(); mail.ReplyToList.Add(replyTo); SmtpServer.Port = 587; SmtpServer.UseDefaultCredentials = false; SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network; SmtpServer.Credentials = new NetworkCredential("your-email@gmail.com", Password); SmtpServer.EnableSsl = true; SmtpServer.Send(mail); EmailRetryAttempts = 0; return true; }

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



Coming soon blog on AI and ML

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



Automating My Job: Custom Website Generator!


Category
Website Development
Sub Category
AI
Last Updated
2/1/2020
Coming soon blog on AI: Automating My Job

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



Implementing ReCAPTCHA for your blog


Category
Website Development
Sub Category
Security
Last Updated
1/20/2020
COMING SOON: ReCAPTCHA Actually I didn't use recaptcha and here is why:

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



Intro to Websites with Webcam Integrations


Category
Website Development
Sub Category
Video
Last Updated
1/2/2020

Coding with Webcams and Videos

Using React and HTML5

Lesson #1, using HTML5 we can easily play any mp4 file type, with code like this:

<video controls="controls"> <source src="~/videos/MatrixTools.mp4" type="video/mp4" /> </video>



#2, Webcam Integration:

<video controls="controls"> <source src="~/videos/MatrixTools.mp4" type="video/mp4" /> </video>



var video = document.getElementById('video'); if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) { video.src = window.URL.createObjectURL(stream); video.play(); }); } COMING SOON: OH wow, I was thinking about recording videos to mp4 but even better make a FACETIME app!!! Using webcams!!!! Btn => turn on webcam => view other webcams? !!!!! THIS IS A GOOD ONE!! Probably this can be another blog too just on the project..

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



COMING SOON: how to setup debug messges production error page etc
// Debug // Error Messages!!! env.EnvironmentName = EnvironmentName.Development; //if (env.IsDevelopment()) //{ app.UseDeveloperExceptionPage(); app.UseBrowserLink(); //} //else //{ // app.UseExceptionHandler("/Error"); //}
// Debug // Error Messages!!! var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .UseSetting("detailedErrors", "true")
usually missing .well-known doesnt get deployed?, link to the other blog how can i fix this? add stdout in the webconfig (does this blog need a title change? maybe: "how to debug production issues with dotnet core") What problems are you having today??
Maybe I can help.

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



Linux: A Free Operating System


Category
Website Development
Sub Category
Operating Systems
Last Updated
5/26/2019
COMING SOON: Linux is Awesome Bash Ubuntu sudo Mint Updates Free / Easy install and partitioning

Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



My Favorite Microsoft Links and Tools


Category
Website Development
Sub Category
.NET
Last Updated
1/26/2019

Reasons I Love Microsoft:

Windows / Azure / .NET Core / C# / Visual Studio / GitHub / SQL Server



The Best Microsoft Development Websites



What sites are your favorite?


Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)



My Favorite Blogs and Newsletters


Category
Website Development
Sub Category
Blogs
Last Updated
1/7/2016

The Best Development Blogs



What sites are your favorite?


Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.

Likes: [0]

Comments: [0]






(this is only to show your gravatar icon)