2020年1月21日 星期二

[筆記]webRequest API與SSL、TLS 相關問題

參考文件:

問題:
  1. 使用HttpWebRequest webRequest方法,遠端傳回
    Could not establish trust relationship for the SSL/TLS secure channel

    原因是因為網頁會詢問你是否繼續。
    所以再詢問前加上
    ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; 
  2. 另外,有可能因為TLS版本不同導致呼叫失敗。可以加上ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
範例:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
HttpWebRequest webRequest=(HttpWebRequest)WebRequest.Create("https://api.com");

2020年1月15日 星期三

[筆記]javascript date 在iphone裝置上問題

最近遇到在iphone裝置上javascript new Date錯誤的問題。

  • 原先寫
    • new Date('2020-01-01');//失敗
  • 改成:
    • new Date('2020/01/01'); //是成功的
  • 不過最後還是改成以下的寫法:
    • new Date(parseInt(item.YEAR), parseInt(item.MONTH), parseInt(item.DAY))
    • 然後 month:1月=0

可能有相關問題導致此錯誤,組數字字串錯誤之類,但先做個筆記。


2019年11月27日 星期三

[筆記]win10 透過 usb 連iphone 無法出現裝置。


  • 參考:https://www.techmarks.com/ios-usb-driver/
  • 裝置管理員>通用序列匯流排控制器
    找 Apple相關的裝置。移除並重新偵測即可。
  • 可能原因,可能第三方軟體或是驅動衝突。

2019年11月5日 星期二

[筆記]IIS500

近端:伺服器上
  • 控制台 > 網際網路選項 > 進階 > 顯示易懂的 HTTP 錯誤訊息 > 打勾取消
  • IIS7 > 站台 > ASP > 偵錯內容 > 將錯誤傳送到瀏覽器 > true


2019年10月23日 星期三

[筆記]安裝MySQL,IIS發生MySqlProvider衝突。

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
其中
<sitemap><provider>…..</provider></sitemap>
加入了MySql相關的provider設定。

移除相關MySQL設定即可。

2019年9月18日 星期三

[筆記]Tab鍵件突然無效

參考網址:

https://www.drivereasy.com/knowledge/solved-tab-key-not-working-in-windows/

提供解法:

  1. Restart your computer
  2. Update keyboard driver
  3. Try keyboard combinations
  4. Shut down TeamViewer

原因:果然是TeamViewer開啟所導致。

2019年8月15日 星期四

[筆記]被Yahoo退件

https://help.yahoo.com/kb/postmaster/SLN7253.html


Error: "554 5.7.9: Message not accepted for policy reasons" when sending email to Yahoo

If your emails aren't being received by Yahoo accounts, it's a good idea to review our Yahoo Mail deliverability FAQ to make sure you're following industry standards for bulk email senders.

Why you're seeing this error

Your message wasn't delivered because Yahoo was unable to verify that it came from a legitimate email sender.

Your email failed one or more authentication checks that Yahoo uses to verify emails are truly sent from the domains they claim to originate from.

Follow industry standards