2021年10月15日 星期五

[OUTLOOK 2016 O365] 隱藏最近使用的檔案Office清單

當我們在Outlook 發信的時候,有時候在別人面前寄信,總是會不小心被看到一些自己的隱私

Outlook 改版至Office 2016 後附加檔案新增了最近使用的項目,想要關掉它卻又找不到設定選項

目前看來只有改機碼能解決


請在搜尋處輸入

Regedit


路徑輸入Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Mail


手動新增

DWORD(32-bit) Value

輸入

MaxAttachmentMenuItems

值類型
REG_DWORD

0






2021年3月10日 星期三

[ASP.Net] A potentially dangerous Request.Form value was detected from the client 儲存HTML語法時遇到錯誤解決方法

利用ASP.NET 回存資料為HTML語法的時候,若是沒有特別處理會被誤判為有攻擊性的存檔

存檔時出現A potentially dangerous Request.Form value was detected from the client

狀況會如下圖顯示:



解決方法
直接在.aspx頁面最上面輸入<%@ Page  validateRequest="false" %>

如果原本就有出現,只需要將這一段加在其中即可 <%@ Page Title="" Language="VB"  AutoEventWireup="false"  validateRequest="false" %>


2021年2月2日 星期二

[ASP.Net] Maximum request length exceeded. 超過上傳檔案限制

如何解決在上傳檔案時遇到檔案過大的錯誤排解

ASP.NET讀取資料或上傳檔案時的預設檔案大小是4MB,因此會直接出現下面的情形

錯誤訊息如下:

Maximum request length exceeded.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Maximum request length exceeded.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



解決方法:

在Web.Config中加上以下資訊

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1048576" />
    </system.web>
</configuration>

<system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
   </security>
 </system.webServer>

2021年1月18日 星期一

[WINDOWS10] 清除Windows10暫存檔 加快電腦速度

 Windows10電腦用久了總是該清一清,尤其是看到C槽出現了紅色的一條,明明還有很足夠的空間,心裡就是不舒服



首先先來處理最常累積的暫存空間

-------------------------IE瀏覽器 可以清除的地方-----------------------

使用cmd執行或是powershell

上網瀏覽歷史

RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 1

上網產生的Cookies

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

上網產生的Internet 臨時文件

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

網頁上的填表記錄

RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 16

-------------------------------個人暫存檔----------------------------------

手動刪除方式

路徑   C:\Users\你登入的帳號\AppData\Local\Temp


指令模式


Get-ChildItem C:\Users\你登入的帳號\AppData\Local\Temp -Recurse | Remove-Item -confirm:$false -force -Recurse -ErrorAction SilentlyContinue

-------------------------------OUTLOOK 暫存檔--------------------------------

手動刪除方式

Outlook 2010、Outlook2007 版本的路徑暫存檔

路徑  C:\Users\你登入的帳號\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\隨機產生的名稱

Outlook 2003版本的路徑暫存檔

路徑  C:\Users\你登入的帳號\AppData\Local\Microsoft\Windows\Temporary Internet Files\OLKFoldername


指令模式

 Get-ChildItem 上述路徑 -Recurse | Remove-Item -Confirm:$false -force -Recurse 

2021年1月15日 星期五

SQL 使用指令重建index

當少了SQL admin的時候,還是有些方法是可以執行我想要做到的事情

所以當我必須重作index的時候,可以利用指令的方式,搭配夜間排程來執行

1.首先將下面script存成檔案,命名為Execute_RebulidIndex.sql