Posts

Add Google reCAPTCHA v2 to ASP.Net Website

Image
The official document to add google reCAPTCHA v2 to the asp.net website is here:   https://developers.google.com/recaptcha/docs/display A good article to follow is here: https://www.c-sharpcorner.com/article/integration-of-google-recaptcha-in-w After registering the  reCAPTCHA keys from here: https://www.google.com/recaptcha/admin Step 1- Add following code to the aspx file to show the reCAPTCHA control:         <div class="form-item" id="divRecaptcha" runat="server">                 <div class="slickbutton clearfix" style="margin:5px auto;width:100%;text-align:center;">                     <div data-theme="light" class="g-recaptcha" data-sitekey="sample public key"></div>                 </div>            </div>            <sc...

Install WordPress on Azure Windows Server 2016 VM with IIS 10 and MySQL

Image
 I have an Azure Windows Server 2016 VM with IIS 10 and MySQL. The VM comes with 2 VCPU and 4GB. It has been working properly to host my website developed with Asp.Net 4.5 and MySQL for a few years. I am thinking about moving my WordPress website to this server as well. Step 1:  Install and configure PHP on IIS 8 in Windows 8 On Windows Server 2016, the Web Platform Installer installed following the above instructions does not show on the program files. It has to be manually started from the following folder.  C:\Program Files\Microsoft\Web Platform Installer With Web Platform Installer, the PHP installation is quite easy. After PHP is installed, the FastCGI module mapping needs to be configured following the instruction in this article: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/fastcgi/ Next, perform the handler configuration: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/handlers/ Now it is time to test the environment to ...

How to Change the Company Name of Dynamics 365 Portal

Image
 By default, the portal home link shows the company name of  Contoso, Ltd.  The company name can be changed in organization administration/setup/organization/legal entities but you cannot change the company account name. Below is the official document to manage the banner and logo https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/get-started/tasks/change-banner-or-logo The place to change the home title is in the content snippet of the website. The content snippets contain all required labels for the website for English and the language you prefer, such as Home Tile, which is Contoso by default. Review all the items in this view and update each of them. By default, there are about 239 items if 2 languages are supported. Click each one to modify.

Map a Google Domain to MS Dynamics 365 Portal and Add SSL Certificate

Image
 I have an account with MS Dynamics 365. So I decide to play with it and create a website using the Dynamics portal. I bought a domain name from Google Domain.  It does not take too much time to update the portal setting and google domain setting to map the domain name with the portal. 1.  Go to the portal management page, there is a tool to set up a custom domain. Add custom domain here. 2. Go to Google domain management, in the DNS page, add a CName with WWW and point it to the yourportal.powerappports.com After a couple of minutes, the setup will take effect and the portal will work with the custom domain. However, the Chrome browser complains that the website is unsafe. To resolve this issue, the only way is to buy an SSL certificate. Since this is a personal website, I do not want to spend too much on SSL. I checked around and found that Namecheap provides SSL at a really low price. My impression is that SSL usually cost hundreds of bucks. However, with Namecheap, an...

Xamarin Quickstart

Image
As usual, the best way to learn something is to use it. Follow the official quickstart sample to develop the Hello World of Xamarin. Xmarin quickstart A few interesting tips: 1. At top right, there are a few icons. One of them can be used to switch to design view as Asp.Net UI designer: 2. In this sample, the local file operation and basic back end code are exactly the same as Asp.net. The only issue I have had is that I changed the application name from "Notes" to "Quickstart_Note" and this caused a build failure. The reason is that then namespace for the Mainpage class is Notes. The namespace has to be used in the App.xaml.cs accordingly. This is how the final app looks like in Android emulator: 3. For the quickstart step 3, SQL Lite recommended by the tutorial has been depreciated. There is an official build specially for Xamarin released by SQLite-net. There is no other issue to follow the quickstart sample. After the quick start, the fundamentals of Xamarin dev...

Xamarin Resouces

The official start point of Xamarin resource is Microsoft Xamarin document site: https://docs.microsoft.com/en-us/xamarin/?WT.mc_id=docs-ch9-jamont    It is also recommended to have a look at github page for the 2020 .Net Conf: Foucus on Xamarin. A lot of Youtube videos, sample apps and keynote powerpoints can be found here: https://github.com/dotnet-presentations/dotNETConf/tree/master/2020/FocusOnXamarin/Technical Following are some interesting samples, controls etc for Xamarin Xamarin.Forms CheckBox Xamarin.Forms RadioButton Xamarin Shell is a great feature that should be checked out as well. It is a usable framework for a mobile app. Xmarin.Forms Shell Another sample for Xamarin Shell can be found here: https://jesseliberty.com/2020/03/07/xamarin-forms-shell/

Javascript Hosted on Google Drive Not Working Reliably

Here is the story. I have been using Google Drive to host the javascript files and stylesheet files all the time. It works perfectly, until a few days ago when I noticed that if the web page contains javascript files hosted at Google Drive, it can not be viewed properly from the Facebook built in web browser.  I did some further investigation. The same thing happened when the page is opened in Wechat built in browser.  However, the page works fine when it is opened in most browsers, like IE, Chrome, Firefox. It took me several hours to figure why. And So far I have not find out the reason. I checked the mime type of the files. They are correctly recognized by Google Drive. But the solution is: moving the files out of Google Drive. Now it works perfectly, in browser and in App built in web browsers as well.