UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-#Author#
[所有文章分類]
所有文章分類
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • dotnet ef dbcontext scaffold
    ...more
  • [ASP.NET] 利用 aspnet_regiis 加密 web.config
    ...more
  • IIS ARR (reverse proxy) 服務安裝
    ...more
  • [錯誤訊息] 請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)
    ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
標籤
  • validatepa
  • 60
  • AD
  • asp.ne
  • unt
  • 4626
  • 50
  • ssl
  • Data
  • 發行者
  • 22
  • iis
  • npoi 弱點
  • inertsql
  • 80
  • @@s2efe
  • hkscs
  • U2
  • 6122121121
  • 70
  • 926
  • visual stu
  • ti
  • let
  • 中文
  • javascript
  • 整數
  • IIS6
  • tim
  • sp_
  • ip
  • sql order
  • jsonconver
  • 212
  • SqlCache
  • line pay
  • cross
  • 824
  • 175
  • 312
  • sysconfig
  • 156
  • Image
  • 752
  • PW
  • 134
  • 712
  • 16
  • 214
  • 322
頁數 2 / 3 上一頁 下一頁
搜尋 console 結果:
政府GPO組態設定 & 所遇到的問題及解決方式
這次因為小三美日要架設新機房設備,所以採用政府GPO的群組原則來提升安全性,關於設定的方式可由以下的附檔內說明使用,

在安裝GPO後,會遇到的問題及解決方式如下

1. 在安裝後發現原先預設使用的administrator帳號被停用,導致無法登入。
    解決:在安裝GPO前,先換一個新的管理權限帳號即可

2. 想要安裝IIS或是hyper-v(新增角色)時,發現安裝權限已被停用。
    解決:先搜尋到gpedit.msc,檢查電腦設定 \ 系統管理範本 \ Windows元件 \ Windowsl遠端殼層 \ 允許遠端殼層存取,是否為  已啟用

3.使用hyper-v安裝windows,再安裝GPO後,發現無法從hyper-v的console登入。
   解決:搜尋gpedit.msc,檢查電腦設定 \ windows設定 \ 安全性設定 \ 使用者權限指派 \ 拒絕透過遠端桌面服務登入,移除本機帳戶

4.使用hyper-v配合GPO會無法將本機的資源(檔案)丟到虛擬主機。
  解決:檢查電腦設定 \ 系統管理範本 \ windows 元件 \ 遠端桌面服務 \ 遠端桌面工作階段主機 \ 裝置及資源重新導向,將不允許磁碟機重新導向,設定為已停用
另外,搜尋gpedit.msc,檢查電腦設定 \ windows設定 \ 安全性設定 \ 使用者權限指派 \ 拒絕從網路存取這台電腦,移除管理權限帳戶

以上設定完後,最好在自己系統的cmd中,輸入gpupdate /force,直接更新原則

 
More...
nelson, 2020/9/16 上午 07:29:19
使用FtpWebRequest.ReName實現移動檔案功能
FtpWebRequest類別沒有提供移動檔案的命令,但是可以透過WebRequestMethods.Ftp.Rename達成相同效果的功能。

    FtpWebRequest ftp_Request = null/* TODO Change to default(_) if this is not a reference type */;
    FtpWebResponse ftp_Response = null/* TODO Change to default(_) if this is not a reference type */;
    string str_FtpAct = "XXX";
    string str_FtpPwd = "XXX";

    // Try to create backup folder. If folder already created, resume to backup. 
    try
    {
        ftp_Request = (FtpWebRequest)WebRequest.Create("D:/testfolder/backup");
        ftp_Request.Credentials = new NetworkCredential(str_FtpAct, str_FtpPwd);
        ftp_Request.Method = WebRequestMethods.Ftp.MakeDirectory;
        ftp_Response = ftp_Request.GetResponse();
    }
    catch (WebException ex_Web)
    {
        FtpWebResponse ftp_ResponseEx = ex_Web.Response;
        int int_ErrCode = ftp_ResponseEx.StatusCode;
        // 550: Access is denied, means directory already exist
        if (int_ErrCode != 550)
            Console.WriteLine("Create Folder Failed!");
    }

    try
    {
        ftp_Request = (FtpWebRequest)WebRequest.Create("D:/testfolder/test.txt");
        ftp_Request.Credentials = new NetworkCredential(str_FtpAct, str_FtpPwd);
        ftp_Request.Method = WebRequestMethods.Ftp.Rename;
        ftp_Request.RenameTo = "../testfolder/backup/test.txt";
        ftp_Response = (FtpWebResponse)ftp_Request.GetResponse();
    }
    catch (WebException webex)
    {
        // Get FTP Error code and exception status
        FtpWebResponse ftp_ResponseEx = webex.Response;
        int int_FtpCode = ftp_ResponseEx.StatusCode;
         // Do something
    }


    finally
    {
        if (ftp_Response != null)
            ftp_Response.Close();
    }
More...
高級水冷氣, 2020/8/4 下午 04:02:46
.Net 4.0 要強迫使用 TLS 1.2 抓資料
突然發現 yahoo 不支援 SSL3.0 或 TLS 1.0 了, 要改用 TLS 1.2 才抓的到網頁資料

​
            ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
            ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;


.Net 4.0 在抓網頁之前先加這兩行, 就可以了. 

.Net 4.5 支援 Tls12, 可以用 

​
            ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
​

 
More...
Bike, 2017/7/31 下午 09:35:43
SVN - cleanup 卡住
有時SVN資料夾檔案,簽入簽出會出錯,然後就完全不能用了
跑 cleanup之後,會出現這樣的訊息
Command: Update Error: Previous operation has not finished; run 'cleanup' if it was interrupted Error: Please execute the 'Cleanup' command. Completed!:


其實是SVN有個工作執行沒有結束,若要 kill 掉這個工作,就要使用 sqlite 工具
(SVN 是以 sqlite 來儲存資料)
1. 要下載 sqlite3.exe 主程式放在 SVN root 目錄下
2. 開啟 cmd, 執行 ​ sqlite3.exe .svn/wc.db "select * from work_queue"
3.刪除 work queue qlite3.exe .svn/wc.db "delete from work_queue"
​4. 把 SVN root 下的 sqlite3.exe 移走
More...
darren, 2017/3/2 下午 04:38:58
IIS7, MVC, 404
在 .100 安裝 MVC 專案時, web.config 要記得檢查有沒有設定 UrlRoutingModule, 如下. 否則會出現 404 的錯誤.
 
<system.webServer>
  <modules>
    <remove name="UrlRoutingModule-4.0" />
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
  </modules>
</system.webServer>
More...
Bike, 2016/11/22 上午 06:51:17
JSON 轉換
http://blog.darkthread.net/post-2012-06-09-json-net-performance.aspx

JavaScriptSerializer、DataContractJsonSerializer及Json.NET

比較

目前是使用 Json.NET >  工具 程式褲套建管理員  > Package manager console 

PM>  
Install-Package Newtonsoft.Json

​就可以安裝了
 
More...
sean, 2016/4/3 下午 04:52:35
deferred jQuery 從 1.5 開始引進了 Deferred Object(延遲物件),可以更簡便地處理非同步程式在不同狀態的 callback。
http://blog.zhusee.in/post/48857667691/jquery-deferred-object

deferred.done(callback)  #=> 成功時執行
deferred.fail(callback)  #=> 失敗時執行
deferred.progress(callback)  #=> 還在跑,但是裡面的程式使用 `.notify` 方法通知進度
deferred.always(callback)  #=> 無論成功或失敗都會執行
deferred.when(filters)  #=> 在呼叫 callback 前先處理資料,後面解釋

當所有 Deferred 都完成後,註冊在 $.when() 下面的 callback 會拿到第一個 Deferred 物件傳給 callback 的參數

var d1 = $.Deferred(), d2 = $.Deferred(),
     w = $.when(d1, d2);

  w.done(function(msg) { console.log(msg) });

  d1.resolve("Part A done");
  d2.resolve("Part B done");

  #=> "Part A done"

 
More...
Doug, 2015/10/15 下午 12:23:54
jQuery 之 event.originalEvent
有時候用 jQuery 使用 event 物件時,會發現有些特殊事件的 property 抓不到 (undefined)
例如
mousewheel --> event.wheelDelta 
drop --> event.dataTransfer
touchstart --> event.touches[0].pageX
原因是 jQuery 的 event 只會包裝一般的屬性,特別的屬性要使用 event.originalEvent 去抓
event.originalEvent 是瀏覽器原生的 event

It's also important to note that the event object contains a property called originalEvent, which is the event object that the browser itself created. jQuery wraps this native event object with some useful methods and properties, but in some instances, you'll need to access the original event via event.originalEvent for instance. This is especially useful for touch events on mobile devices and tablets.

所以開發時當有些特殊屬性抓不到時,可以考慮用 event.originalEvent 去抓看看

    // 這是用滾輪放大縮小圖片 (此範例firefox不支援)
    $("#imgProductBig").bind("mousewheel", function (ev) {
        var delta = ev.originalEvent.wheelDelta > 0 ? 1 : -1;
        if (delta > 0 && zoomValue < 150) {
            zoomValue += 10;
        }
        else if (delta < 0 && zoomValue > 50) {
            zoomValue -= 10;
        }
        $(this).css("zoom", zoomValue + '%');
        return false;
    });


 
More...
darren, 2015/4/21 下午 12:03:35
C# difference between `==` and .Equals()
這可能是老問題了,但還是提醒一下
當用  (Object == Object) 比較時,是用 System.Object.ReferenceEquals
所以即使兩個值是一樣的,因為 reference 是不同物件, 他還是會回傳 false
http://stackoverflow.com/questions/814878/c-sharp-difference-between-and-equals

例如要比較一個 datarow 兩個欄位值

row["SDate"] = "2015-04-01";
row["EDate"] = "2015-04-01";

(row["SDate"] == row["EDate"]) ==> false
(row["SDate"].Equals(row["EDate"])) ==> true
(row["SDate"].ToString() == row["EDate"].ToString()) ==> true
More...
darren, 2015/4/14 下午 03:16:40
讓 IE6-8 認識 CSS 的 Media Query
使用CSS Media Query可以實現響應式網頁設計(Responsive Web Design)
但是在眾多瀏覽器中唯有IE這個萬惡瀏覽器到 IE9 及之後的版本才支援 CSS Media Query,不過有辦法可以讓 IE6 到 IE8 支援 Media Query 語法,那就是 Respond.js。

要注意的地方是:respond.js要放在css下面(順序有關係)
例:

<link rel="stylesheet" type="text/css" href="style.css" media="screen" />

<script type="text/javascript" src="js/respond.min.js"></script>


Demo

下載地址:Respond.js
 
More...
nelson, 2014/9/26 上午 11:25:45
|< 123 >|
頁數 2 / 3 上一頁 下一頁
~ Uwinfo ~