顯示具有 登入 標籤的文章。 顯示所有文章
顯示具有 登入 標籤的文章。 顯示所有文章

2022年7月20日 星期三

[研究]登入測試-帳號不在Users群組(Windoss 2019)

[研究]登入測試-帳號不在Users群組(Windoss Server 2019)

2022-07-20

********************************************************************************




********************************************************************************
測試1




測試結果,帳號不在 Users 群組,會無法本機登入;但 PowerShell 的 Get-LocalUser 仍會列出它是 Enabled。

********************************************************************************

測試2

(下圖)用 TEST 這個AD網域的帳號 ADUser1 登入

(下圖) 登入成功了

也就是 AD Domain 的帳號,就算不在本機的 Users 群組中,依然可以登入。
********************************************************************************

(完)

2022年4月24日 星期日

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(六)

2022-04-24

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Login.html

<style>
	.css-form {
	color: #202124;
    font-size: 15px;
    line-height: 1.4286;
    padding: 20px 40px 36px;
    height: 340px;
	width: 370px;
	border-color:blue;
	border:1px solid blue;
	border-radius: 10px;
	margin:60px auto auto auto;	
	}
	.css-input {
     white-space: normal;
    border: 1px;
    display: block;
    line-height: 24px;
    min-width: 0%;
    outline: 1px;
    box-sizing: inherit;
    border-radius: 4px;
    color: #202124;
    font-size: 17px;
    height: 28px;
    margin: 1px 1px 0 1px;
    padding: 13px 15px 13px 15px;
    text-align: left;
	border: 1px solid;
    border-color:blue;
	width:330px;
	}
	.css-btn {
    font-size: 14px;
	border-color: #ffffff;
    background-color: #5555ff;
	color: #ffffff;
	width:117px;
	height:40px;
	border-radius:10px;	
	shadow:none;
	}
</style>
<div class="css-form">
	<h1><center>管理平台</center></h1>
	<div style="font-size: 17px; ">帳號</div>    
	<input id="userid" name="userid" type="email" class="css-input" placeholder="請輸入Email">
	<br \>
	<div style="font-size: 17px; ">密碼</div>    
	<input id="pw name="userid" type="password" class="css-input" placeholder="請輸入密碼">
	<br \><br \>
	<button type="submit" class="css-btn">登入</button>
	<button type="button" class="css-btn">忘記密碼</button>
	<button type="button" class="css-btn">註冊</button>
</div>

(下圖)結果


(完)

相關

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(四)

[研究][ASP.NET]登入畫面表單美工設計(三)
https://shaurong.blogspot.com/2022/04/aspnet_14.html

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html


[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(五)

2022-04-24

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Login.html

<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset="UTF-8">
<style>
.css-form {
    border: 2px solid rgb(211, 215, 236);
    border-radius: 42px;
    box-shadow: rgb(45 64 150 / 6%) 0px 6px 0px;
    padding: 24px;
    position: relative;
	width:500px;
	height:350px;
	margin-left:auto;
	margin-right:auto;
}
.css-input {
    box-sizing: border-box;
    outline: none;
    width: 95%;
    padding: 18px 18px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.25px;
    font-weight: 600;
    color: rgb(44, 42, 80);
    border-radius: 42px;
    border: 2px solid rgb(211, 215, 236);
	margin:10px;
}
.css-btn {
    box-sizing: border-box;
    outline: none;
    width: 28%;
    padding: 18px 24px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.25px;
    font-weight: 600;
    color: rgb(44, 42, 80);
    border-radius: 42px;
    border: 2px solid rgb(211, 215, 236);
	margin:10px;
}
</style>
</head>
<body>
<div class="css-form">
<center><h1>管理平台</h1></center>
<input type="text" placeholder="電子郵箱" class="css-input">
<input type="password" placeholder="密碼" class="css-input">
<center>
<input type="button" class="css-btn" value="登入">
<input type="button" class="css-btn" value="忘記密碼">
<input type="button" class="css-btn" value="註冊">
</center>
</div>
</body>
</html>



(下圖)結果



(完)

相關

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(四)

[研究][ASP.NET]登入畫面表單美工設計(三)
https://shaurong.blogspot.com/2022/04/aspnet_14.html

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html


[研究][ASP.NET]登入畫面表單美工設計(四)

 [研究][ASP.NET]登入畫面表單美工設計(四)

2022-04-24

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Login.aspx

<%@ Page Language="C#" AutoEventWireup="true" 
    CodeBehind="Login.aspx.cs" Inherits="WebApplication1.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        input {
            /*background:#F8F8F8;*/
            padding: 10px;
            margin:5px;
            border-radius:5px;
        }
        input[type="submit"]{
            background:#74AC00;
            border-color:#74AC00;
            margin:5px;
            padding: 5px 40px 5px 40px;
            border-radius:10px;
            color:white;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <center>
            <h1>登入</h1>
            <fieldset style="border-radius: 10px; width:1px; background-color: #eeeeee;">
                <legend>帳戶資訊</legend>
            <asp:TextBox ID="TextBox1" runat="server" PlaceHolder="帳號"></asp:TextBox><br />
            <asp:TextBox ID="TextBox2" runat="server" PlaceHolder="密碼"></asp:TextBox><br />
            <asp:Button ID="Button1" runat="server" Text="登  入" /><br />
            <asp:HyperLink ID="HyperLink1" style="text-decoration: underline;" 
                runat="server">忘記密碼</asp:HyperLink>
                </fieldset>
        </center>
    </form>
</body>
</html>



(下圖)結果


(完)

相關

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(四)

[研究][ASP.NET]登入畫面表單美工設計(三)
https://shaurong.blogspot.com/2022/04/aspnet_14.html

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html


2022年4月14日 星期四

[研究][ASP.NET]登入畫面表單美工設計(三)

[研究][ASP.NET]登入畫面表單美工設計(三)

2022-04-14

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Login.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" 
    Inherits="WebApplication1.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <style>
        .LoginForm {
            padding: 10px;
            width: 500px;
            border: 4px solid #1199CD;
            margin-right: auto;
            margin-left: auto;
            background-color: #FFF;
            margin-bottom: 30px;
            border-radius: 12px;
            overflow: auto;
        }

        td {
            height: 25px;
            font-size: 20px;
            padding: 8px;
        }

        input {
            height: 20px;
            font-size: 20px;
            padding: 8px;
            border-radius: 5px;
        }
            input[type=button], input[type="submit"] {
                height: 40px;
                font-size: 16px;
                padding: 8px 15px 8px 15px;
                border-radius: 5px;
            }
    </style>
    <script type="text/javascript">
        function forgotPw() {
            var url = "forgot.aspx";
            //window.location(url);
            location.href = url;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table class="LoginForm">
                <tr>
                    <th colspan="2" style="font-size: xx-large">登入<br />
                        <hr />
                    </th>
                </tr>
                <tr>
                    <td>帳 號</td>
                    <td>
                        <asp:TextBox ID="TextBox1" AutoComplete="Off" required="required" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>密 碼</td>
                    <td>
                        <asp:TextBox ID="TextBox2" TextMode="Password" AutoComplete="Off" required="required" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>驗證碼</td>
                    <td>
                        <asp:TextBox ID="txtCheckCode" Width="100px" AutoComplete="Off" required="required" runat="server"></asp:TextBox>
                        <img src="/CheckImageCode.aspx" width="69" height="20" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;">
                        <asp:Button ID="Button_Login" runat="server" Text="登入" />&nbsp;
                        <input id="Button1" type="button" value="忘記密碼" onclick="forgotPw()" />
                        <input id="Button2" type="button" value="說明" onclick="javascript:location.href='Doc.aspx'" />
                    </td>
                </tr>
            </table>
            <asp:Label ID="Label_Message" runat="server"></asp:Label>
        </div>
    </form>
</body>
</html>


注意,忘記密碼按鈕不要用 ASP.NET 控制項按鈕 Button,否則會觸發其他欄位 HTML5 的 required 必填欄位要求,使得無法轉向到其他網址,請直接用 HTML 的 Input(button) 搭配 JavaScript 才行。

(下圖)結果


注意:aspx.cs檔案中可能不要用下面這種彈出對話盒視窗
Response.Write("<script>alert('" + DateTime.Now.ToString() + " Captcha 圖形驗證碼錯誤');</script>");
否則驗證碼輸入錯誤,按下登入按鈕後,Input ( TextBox) 輸入框會扁掉,要用 ASP.NET 專用寫法,例如:Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + DateTime.Now.ToString() + " Captcha 圖形驗證碼錯誤');</script>");
敝人某方案會有此狀況,但在另一成方案中又很正常。

(完)

[研究][ASP.NET]登入畫面表單美工設計(三)

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html


2022年4月12日 星期二

[研究][ASP.NET]登入畫面表單美工設計(二)

[研究][ASP.NET]登入畫面表單美工設計(二)

2022-04-12

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="Default6.aspx.cs"
    Inherits="WebApplication1.Default6" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <%--bootstrap.css 非必須--%>
    <link href="Content/bootstrap.css" rel="stylesheet" />
    <link rel="shortcut icon" href="/favicon.ico" />
    <style>
        .LoginForm {
            padding: 10px;
            width: 400px;
            border: 4px solid #1199CD;
            margin-right: auto;
            margin-left: auto;
            background-color: #FFF;
            margin-bottom: 30px;
            border-radius: 12px;
            overflow: auto;
        }
    </style>
</head>
<body>
    <br />
    <form id="form1" runat="server">
        <div class="LoginForm">
            登入
                <hr />
            <p>
                帳  號:
                <input name="TextBox1" type="text" id="TextBox1" autocomplete="Off" /><br />
            </p>
            <p>
                密  碼:
                <input name="TextBox2" type="password" id="TextBox2" autocomplete="Off" /><br />
            </p>
            <p>
                驗證碼:
                <input name="txtCaptchaCode" type="text" id="txtCaptchaCode" autocomplete="Off" style="width: 60px;" />
                <img src="GetCaptchaCode.aspx" width="69" height="20" />
            </p>
            <p style="text-align: center">
                <input type="submit" name="Button1" value="登入" id="Button1" />
            </p>
            <span id="Label_Message"></span>
        </div>
    </form>
</body>
</html>



(下圖)結果

(下圖)結果 (有 bootstrap.css)
(完)

相關

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(四)

[研究][ASP.NET]登入畫面表單美工設計(三)
https://shaurong.blogspot.com/2022/04/aspnet_14.html

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html


[研究][ASP.NET]登入畫面表單美工設計(一)

[研究][ASP.NET]登入畫面表單美工設計(一)

2022-04-12

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

只是設計一個還可以看的畫面,筆記一下。

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <%--和 bootstrap.css 不相容--%>
    <%--<link href="Content/bootstrap.css" rel="stylesheet" />--%>
    <style>
        .submitButton {
            text-align: right;
            padding-right: 10px;
        }
    </style>
       <script>
        function ShowPwd() {
            var x = document.getElementById("TextBoxPassword");
if (x.type === "password") { x.type = "text"; } else { x.type = "password"; } } </script> </head> <body> <form id="form1" runat="server"> <h1>登入</h1> <div style="width: 20%;"> <fieldset style="border-radius: 10px; background-color: #eeeeee;"> <legend>帳戶資訊</legend> <p> <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">帳號:</asp:Label> <asp:TextBox ID="UserName" runat="server" PlaceHolder="請輸入" required="required"></asp:TextBox> </p> <p> <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" Text="password">密碼:</asp:Label> <asp:TextBox ID="TextBoxPassword" runat="server" TextMode="Password" PlaceHolder="請輸入" required="required"></asp:TextBox> <%--<input type="checkbox" onclick="ShowPwd()">顯示密碼--%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:CheckBox ID="CheckBox1" OnClick="ShowPwd()" runat="server" Text="顯示密碼" /> </p> </fieldset> <p class="submitButton"> <asp:Button ID="LogOnButton" runat="server" CommandName="LogOn" Text="登入" />&nbsp; <asp:Button ID="Button_FogotPassword" runat="server" Text="忘記密碼" /> </p> </div> </form> <asp:Label ID="Label_Message" runat="server" Text=""></asp:Label> </body> </html>

結果

(完)

相關

[研究][ASP.NET]MasterPage中ContentPlaceHolder內的 JavaScript「顯示密碼」功能
[研究][ASP.NET]JavaScript 抓取 ContentPlaceHolder 中 ASP.NET 控制項的 ID
https://shaurong.blogspot.com/2022/04/aspnetmasterpagecontentplaceholder.html

[研究][JavaScript]切換顯示和隱藏密碼
http://shaurong.blogspot.com/2019/02/javascript.html

[研究][ASP.NET]讓超連結或 LinkButton 看起來像是按鈕
https://shaurong.blogspot.com/2022/04/aspnet-linkbutton.html

[研究][ASP.NET]登入畫面表單美工設計(六)

[研究][ASP.NET]登入畫面表單美工設計(五)

[研究][ASP.NET]登入畫面表單美工設計(四)

[研究][ASP.NET]登入畫面表單美工設計(三)
https://shaurong.blogspot.com/2022/04/aspnet_14.html

[研究][ASP.NET]登入畫面表單美工設計(二)
https://shaurong.blogspot.com/2022/04/aspnet_12.html

[研究][ASP.NET]登入畫面表單美工設計(一)
https://shaurong.blogspot.com/2022/04/aspnet.html