ref.
在 config 模式底下輸入
# remote-management 1 start-addr <ip> end-addr <ip> service telnet http ssh https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration> | |
| <system.web> | |
| <!-- KBytes --> | |
| <!-- 500MB --> | |
| <httpRuntime maxRequestLength="512000" /> | |
| </system.web> | |
| <system.webServer> | |
| <security> | |
| <requestFiltering> | |
| <!-- Bytes --> |
在 Web.config 設定表單驗證
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" />
</authentication>
<authorization>
<deny users="?" />
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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" /> |
NewerOlder