發表文章

目前顯示的是 7月, 2022的文章

Prettier visiual code formatting

圖片
  save no effect press alt + shift + f -> select premit 

react hook form invisible className error

圖片
 唔可以用 " , 要用 ` className = { `form-control ${ errors.surname ? 'is-invalid' : '' } ` } /*Validation Check -> photo, email, hkid + year + day => not allow to creaete recaptcha */ import React, {useState, useEffect} from "react"   import {Link} from "react-router-dom" import AuthService from "../services/auth.service" ; import { useNavigate } from "react-router-dom" ; import "react-toastify/dist/ReactToastify.css" ; import {toast} from 'react-toastify' ; import { useForm } from "react-hook-form" ; import { yupResolver } from '@hookform/resolvers/yup' ; import * as yup from 'yup' ; export default function Register() {         const handleRegister = async (data) => {         //e.preventDefault();         console.log(data);         try {                 /*           await AuthService.login(userName, pass...

Reactjs install IIS 加jump page

圖片
 https://stackoverflow.com/questions/63365558/how-can-i-host-react-app-in-iis-web-server After we run the below command, the output will create a new folder called “build” inside the project which contains production build. We could host the project by copying these files to the root directory of the IIS website, the website root folder should be able to be accessed properly by the anonymous account, and therefore we should grant IUSR account full access to the folder if it is not the default website.  After adding the web site binding in IIS binding module, We could access the website properly by using the below address. http : //localhost Besides, if we adding certain routing features (multiple components) in the react application, we have to install the IIS URL Rewrite extension. https://www.iis.net/downloads/microsoft/url-rewrite After a successful installation, we need to create a web.config file containing the below content under the root directory of the IIS website. ...

Login failed for user 'IIS APPPOOL

圖片
 https://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0 ou need to add a login to SQL Server for  IIS APPPOOL\ASP.NET v4.0  and grant permissions to the database. In SSMS, under the server, expand Security, then right click Logins and select "New Login...". In the New Login dialog, enter the app pool as the login name and click "OK". You can then right click the login for the app pool, select Properties and select "User Mapping". Check the appropriate database, and the appropriate roles. I think you could just select  db_datareader  and  db_datawriter , but I think you would still need to grant permissions to execute stored procedures if you do that through EF. You can check the details for the roles  here . ++++++++++++++++++ 唔洗search 用番個名就得

HTTP Error 500.32 - Failed to load .NET Core host

圖片
 Enable 32 bit

angular deploy iis

3. Configure Angular to output files in the development build When using Angular with the default development server,  ng serve  , the output is in memory and will not be written to disk. To use our own server, we need to use  ng build --watch , which will watch files just like  ng serve , but will write them to disk, and will not run a server. Therefore, update the  package.json  file and add one more command in  scripts , that will execute this command. https://levelup.gitconnected.com/how-to-deploy-angular-app-to-an-iis-web-server-complete-setup-337997486423 Route 同埋 deploy size 都有set , 昨日唔記得mark  同埋, 都有.net core COR 要set 番個Path