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
標籤
  • length2121
  • 黑貓 EGS
  • 20
  • -3679
  • -3643
  • Operation
  • 1602
  • ti
  • bkXLPYQo
  • MS8qKi9BTm
  • -3036
  • 774
  • ReportView
  • -6666
  • cheap
  • -1797
  • [U2]
  • asp
  • 錯誤 cs0241:
  • 找到的組件資訊清單定
  • CROS
  • -8430
  • SQL Server
  • div2121121
  • request
  • a
  • checkbox
  • 4Arpq52S
  • 四拾五入
  • UWInfo Blo
  • debugWAITF
  • c
  • 3441
  • FTP
  • 備份
  • cache啟用
  • 不允許儲存
  • useragent
  • write
  • contains-f
  • ARR
  • RequestEnc
  • Block
  • CK
  • SQL
  • 0 order by
  • end
  • 422
  • WU
  • 310
搜尋 Windows 2008 結果:
windows 2008R2 大量工作排程的匯出備份以及匯入
由於工作排程往往有數十個甚至百來個 因此需要一個方法能快速備份及移轉到其他 server 的方法
查了一下,好像也只能這樣做

---- 使用指令把全部排程匯出 ----
參考網址
https://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

schtasks /query /XML > all_tasks.xml  
schtasks /query /FO CSV /V >sched_tasks.csv

** xml 比較有用,可以用來匯入到其他server排程,但還要額外處理才能匯入
** csv 只是用來看看目前有哪些排程 可以用來做報表看看
** 這些是全部排程,還要特別處理把 Microsoft 及其他軟體建的排程移除

--------------------------------------------------------------

----如何匯入工作排程到其他 server --------

** 需再寫程式把 all_tasks.xml 拆解成所有排程的單一 xml
   並且生成指令 bat

** 注意 xml 必須是 UTF-16 (unicode) 
   因為 "schtasks /query /XML > all_tasks.xml"產生 xml 是 ansi 

參考網址
https://serverfault.com/questions/325569/how-do-i-import-multiple-tasks-from-a-xml-in-windows-server-2008
** /TN "排程名稱" --- 排程名稱可以是路徑名 
D:\>schtasks.exe /create /TN "\2016JOB\Global\CountryMonthlyStats" /XML "D:\one_task.xml"
** 下面程式碼只是下面程式碼只是參考 還沒實作過
=====================================

var taskXML = new XmlDocument();
taskXML.Load(@"d:\temp\schedtasksBackup.xml");
var batbody = new StringBuilder();

XmlNodeList tasks = taskXML.DocumentElement.GetElementsByTagName("Task");

string strFileName = "d:\\temp\\Task";

for (int i = 0; i < tasks.Count; i++) {
    string onetaskXML = tasks[i].OuterXml;

    //Create the New File. With a little more extra effort
    //you can get the name from a comment above the task -> 應該把註解裡的名稱抓出
    XmlWriter xw = XmlWriter.Create(strFileName + "_" + (i+1) + ".xml");
    batbody.AppendLine(string.Format("schtasks.exe /create /TN \"{0}\" /XML \"{1}\"", "Task " + (i+1) + " Name", strFileName + "_" + (i+1) + ".xml"));

    //Write the XML
    xw.WriteRaw(onetaskXML.ToString());
    xw.Close();

    // Write a bat to import all the tasks
    var batfile = new System.IO.StreamWriter("d:\\temp\\importAllTasks.bat");
    batfile.WriteLine(batbody.ToString());
    batfile.Close();

}
=====================================

#微軟的排程備份真是有夠爛沒有辦法用介面一鍵搞定


More...
darren, 2017/5/5 下午 12:07:30
Application_BeginRequest 沒有作用, windows 2008, IIS7, MVC,
在 windows  2008 的 IIS7 跑 MVC, 會遇到 Application_BeginRequest 沒有作用, 可以在 web.config 中加一個:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

另外聽說裝 KB980368 會是比較好的解決方法, 有空再來試試.

參考: http://blog.darkthread.net/post-2015-05-30-aspnet-mvc-on-win2008.aspx
More...
Bike, 2016/11/29 上午 09:17:41
Windows server 2012 / 2008 遠端桌面解除單一連線的設定 (Remote Desk Top)
Steps
 

 

windows 2008 的位置有點不一樣:
 



 
 
More...
Bike, 2016/10/6 上午 11:19:27
Fixing Windows 2008 R2 Activation Errors
http://lifeofageekadmin.com/fixing-windows-2008-r2-activation-errors/

​Location is at C:\windows\system32\Slmgr.vbs
/ckms = clear all KMS servers in cache and set to auto discover
/skms :  = Specify a KMS host server
/ipk  = Enter in a new license key
/ato = Activate the new key
/dlv = Display license information
First open a command prompt and try to register a license key. This example is for Windows 2008 R2 Enterprise Edition.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error again or another error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /rilc
Reboot
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
More information can be found at Configuring KMS Clients
More...
Bike, 2014/11/3 下午 04:49:25
Windows 8.1 的優點
真不知道為什麼要花很多時間升級一個系統,然後再花很多時間讓它看起來和舊的一樣。  -- Windows 8.1

最近開始用 Windows 8.1 ,雖然大家都對它抱怨連連,但還是有一點點好處的啦 !! 我們總是在眾多缺點中找到優點。以下列舉幾個,希望未來可以慢慢增加。這些都是對工和師而言有感的優點。

另外我是從 windows 2008 跳到 windows 8.1,所以可能有部份功能是 window 7 就有的,請各位見諒:

1.Activited Window 的邊界更明顯,開很多視窗時更好找到邊界。

2.倉頡輸入法可以有類似 auto complete 的功能,可以少打幾個鍵就選到字。

3. 下方的工作列不合併的程式時,有把相同的程式放在一起,很好找。而且可以換位置對於常常在工作列找東西的人而言。真是一大福音。

4. 可把特定的程式釘在工作列的固定位置, 例如先排 Chrome ,再排 visual studio,會方便你找東西。

未來有發現其它的優點再和大家報告。
More...
Bike, 2014/1/2 下午 07:34:49
Windows 2008 的 SMTP 寄信問題 (need fully-qualified hostname)

Windows 2008 的 SMTP 寄信時若遇到 "Helo command rejected: need fully-qualified hostname" ,可做以下的修改。

The fix is easy:

  1. Open IIS
  2. View the properties of you Default SMTP Virtual Server
  3. Go to the “Delivery” tab
  4. Click the “Advanced” button (in the bottom right corner)
  5. Under “Fully-qualified domain name” enter a domain name that points to the server
  6. Click Ok until you’re back to IIS
More...
Bike, 2013/10/28 上午 09:50:56
Direct Server Return on Windows 2008 using loopback adpter (server load balance)
要執行以下的指令:

netsh interface ipv4 set interface "net" weakhostreceive=enabled
netsh interface ipv4 set interface "loopback" weakhostreceive=enabled
netsh interface ipv4 set interface "loopback" weakhostsend=enabled

其中 "net" 是外接網卡的名稱,"loopback"是虛擬網站的名稱。

請參考: http://blog.loadbalancer.org/direct-server-return-on-windows-2008-using-loopback-adpter/
More...
Bike, 2013/10/27 上午 11:33:00
Windows 2008 SMB2.0 切換 SMB1.0 (與共享目錄效能有關)
狀況

手札的圖片共享目錄約三~四天會無法開啟(\\192.168.0.7 直接掛掉)
對應的服務 Server 會無法重新開啟

在 Windows 2008 Server 將 SMB2.0 => SMB 1.0 方法
參考連結 http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm

Client  關閉
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled

Client 重開
sc config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc config mrxsmb20 start= auto

Server
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\Smb2 => 設為 Dword 0
需重開機,開機完後 Client 連不到也需重開

設好後,這些背後靈又出現要設了。
HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\MaxCmds => 500 以上
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\MaxMpxCt =>500 以上
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\MaxWorkItems => 5000以上

設完後有以下現象。
系統管理工具=>共用與存放管理=>管理工作階段  
每個連線的開啟檔案數是會增加減少跳動的,在SMB2.0下僅會緩慢增加
 




More...
Jerry, 2012/6/2 下午 03:57:43
Disable TCP/IP “Auto Tuning
最近遇到客戶的電腦三不五時無法連接檔案分享的問題, 查了一下 Windows 2008 和 Win 7 很多網路問題都可能和 Auto Tuning 有關, 以下是關閉的方法.

顯示網路狀態:
netsh interface tcp show global

關閉 Auto Tuning:
netsh interface tcp set global autotuning=disabled

開啟 Auto Tuning:
netsh interface tcp set global autotuningl=normal


2012/05/19
嘿嘿 .. 問題又發生了, 看來沒什麼效果..
More...
Bike, 2012/5/17 上午 08:28:35
SVN 新增的檔案自動加入 Needs Lock 的屬性 on Windows 2008
網路上有很多介紹, 但最討厭的是每個 OS 的設定檔的位置都不太一樣, 在 Windows 2008 下面, 設定檔位於

C:\Users\XXX\AppData\Roaming\Subversion\config

我是直接在最後面加了一行:

* = svn:needs-lock=true

讓所有新增的檔案都有 Needs-Lock 的屬性.
More...
Bike, 2012/5/3 下午 04:15:49
~ Uwinfo ~