在 Web.config
設定表單驗證
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" />
</authentication>
<authorization>
<deny users="?" />
<configuration> | |
<system.web> | |
<customErrors mode="On"> | |
<!-- 先移除 --> | |
<remove statusCode="401" subStatusCode="-1" /> | |
<remove statusCode="403" subStatusCode="-1" /> | |
<remove statusCode="404" subStatusCode="-1" /> | |
<!-- 再增加 --> | |
<error statusCode="401" path="https://google.com" responseMode="Redirect" /> | |
<error statusCode="403" path="/403.html" responseMode="ExecuteURL" /> |
在 Web.config
設定表單驗證
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" />
</authentication>
<authorization>
<deny users="?" />
<configuration> | |
<system.web> | |
<!-- KBytes --> | |
<!-- 500MB --> | |
<httpRuntime maxRequestLength="512000" /> | |
</system.web> | |
<system.webServer> | |
<security> | |
<requestFiltering> | |
<!-- Bytes --> |
public static void js(string func) | |
{ | |
var page = HttpContext.Current.Handler as Page; | |
page.ClientScript.RegisterClientScriptBlock(page.GetType(), "js", func, true); | |
// var script = new LiteralControl(string.Format("<script>{0}</script>", func)); | |
// page.Controls.Add(script); | |
} |
ref.
在 config 模式底下輸入
# remote-management 1 start-addr <ip> end-addr <ip> service telnet http ssh https