2022年2月8日 星期二

[Skype for Business] Exchange needs your credentials. Until then you might see outdated info in Skype for Business

 Skype for Business 偶而會在訊息欄處跳出訊息,上面顯示【Exchange needs your credentials. Until then you might see outdated info in Skype for Business】


少了這個與AD的認證會影響到行事曆的提醒


目前測試可以直接成功的解法,在檔案總管中直接開啟下面路徑

%UserProfile%\AppData\Local\Microsoft\Office\16.0\Lync


操作步驟

1.先結束Skype for Business

2.找到路徑【%UserProfile%\AppData\Local\Microsoft\Office\16.0\Lync】底下的資料夾可以找到sip_user@domain.com資料夾,可直接刪除

3.重新啟動Skype for Business即可





2022年2月7日 星期一

[VB.NET]判斷月份天數

因應2月份不固定最後一天的天數,如果單純寫成30或31天都會造成程式上的錯誤,所以還是直接使用判斷來指定天數會比較妥當。

 OrderYear =2022

OrderMonth =2


            Dim DatestringStart As String = OrderYear & "/" & OrderMonth & "/01"

            Dim Days As Integer = System.DateTime.DaysInMonth(OrderYear, OrderMonth)

            Dim DatestringEnd As String = OrderYear & "/" & OrderMonth & "/" & Days


參考資料

DateTime.DaysInMonth(Int32, Int32) 方法

2022年1月11日 星期二

[Vb.NET] 搜尋指定文字資料夾 & 尋找資料夾中的副檔名 或 特定文字

         Dim sSourcePath As String = txtDirection.Text.Trim

        Dim sDestPath As String = ""

        Dim sTextToFind As String = "搜尋指定文字資料夾"

        Dim FolderName As String = ""

        Dim PrinterFolderPath As String = sSourcePath


        For Each sDir In Directory.GetDirectories(sSourcePath, "*" & sTextToFind & "*")

            FolderName = Path.GetFileName(sDir)

            PrinterFolderPath = sSourcePath & "\" & FolderName

            Dim di As New DirectoryInfo(PrinterFolderPath)



            '抓取資料夾中檔名,並只取PDF

            For Each fi As FileInfo In di.GetFiles()

                If fi.Extension.ToLower = ".pdf" Then

                   '資料夾中檔案副檔名是PDF的

                End If

           

                If fi.Name.ToLower.Contains("TEST") Then

                   '找出資料夾中的檔案名稱有包含TEST的

                End If


            Next

        Next

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