Monday, November 16, 2009
[Study] Maintaining Redo Log Files
1:11:00 PM | Filed Under oracle, slide share | 0 Comments
Friday, November 06, 2009
WSS 3.0 Open links In New Window
這兩個禮拜一直在替WSS換長相,摸出了一些心得。不過今天不講這些XD
講一下WSS的超連結,預設行為都是開在同一個頁面,但是對於那些專門做連結的清單、或是就是要另開新視窗的連結而言,若無法改變WSS行為,操作起來就相當麻煩。
Entonces, 該如何設定讓WSS的特定頁面的超連結行為為開新視窗呢?
- 移駕至該頁面
- 點選右上角"網站動作" > "編輯頁面" > "新增網頁組件"
- 選擇"內容編輯器網頁組件" > 新增
- 組件新增至頁面上後,點選內容的"開啟工具窗格"
- 點選"原始檔編輯器...",會跳出一個空白對話框,在裡面貼上以下程式:
1: <script language="JavaScript">
2:3: //add an entry to the _spBodyOnLoadFunctionNames array
4: //so that our function will run on the pageLoad event
5:6: _spBodyOnLoadFunctionNames.push("rewriteLinks");
7:8: function rewriteLinks() {
9:10: //create an array to store all the anchor elements in the page
11: var anchors = document.getElementsByTagName("a");
12:13: //loop through the array
14:15: for (var x=0; x<anchors.length; x++) {
16: //does this anchor element contain #openinnewwindow?
17:18: if (anchors[x].outerHTML.indexOf('#openinnewwindow')>0) {
19: //store the HTML for this anchor element
20: oldText = anchors[x].outerHTML;21:22: //rewrite the URL to remove our test text and add a target instead
23: newText = oldText.replace(/#openinnewwindow/,'" target="_blank');
24:25: //write the HTML back to the browser
26: anchors[x].outerHTML = newText;27: }28: }29: }30:31: </script>
- 儲存後,另外在"版面配置"區段下將"隱藏"方框勾選起來即可套用,並結束編輯頁面。
- 最後,針對該頁面需要在新視窗開啟的超連結網址後面全部加上"#openinnewwindow"即可!!!
稍微說明一下上面那段javascript主要在做什麼:
首先,第7點說的在網址後面加上"#openinnewwindow"字樣其實是跟程式互相配合的,行18即是尋找所有超連結網址裡是否有這個字樣,如果有找到,就把他換成" target=_blank"這樣而已XD 所以有該字樣的 <A>tag行為就會變成以新視窗開啟了~
11:41:00 AM | Filed Under SharePoint | 0 Comments
Monday, October 26, 2009
[Study] Maintaining the Control File
1:15:00 PM | Filed Under oracle, slide share | 0 Comments
Tuesday, October 20, 2009
[Study] Data Dictionary Content and Usage
10:36:00 AM | Filed Under oracle, slide share | 0 Comments
Monday, October 12, 2009
[Study] Creating a Database
1:12:00 PM | Filed Under oracle, slide share | 0 Comments
Wednesday, October 07, 2009
Request Cert Without IIS(Server2008) and Config Reporting Server 2008 using SSL
吼!!!!!!!!!!!!!!!!!!!!! 搞了兩個多禮拜!!
記錄一下
- 怎麼利用Certreq.exe工具產生一個憑證要求,再利用此*.req向內部憑證核發單位要到憑證。這是完全不透過IIS要求憑證的做法。
- 設定讓Reporting Service也能使用安全性連線(https://XXX/ReportServer)
之前將SQL Server從2005整個異機升級到2008(here),2008的report server號稱不再依靠IIS就可以運作,好是好,但是我要做安全性連線阿!!! 一直以來只知道怎麼用IIS要求憑證,現在既然沒IIS了... 也不想因為一個憑證就架起來,文件也說IIS 和 Reporting Services 安裝在同一部電腦上會影響報表伺服器的SSL連線(here),只好開始研究怎麼不靠IIS取得憑證。
利用Certreq.exe
- 先產生一個*.inf,待會配合certreq -new要用的,*.inf內容如下:
抱歉我無法解釋這個東西.....
(subject內CN=" "內需改成完整電腦名稱) - 以系統管理員身分開啟命令提示字元(cmd),切換到剛剛產生的inf檔資料夾下,假設剛剛存的檔案為certReq.inf。用下面指令產稱一個*.req檔> certreq -new certReq.inf certReq.req
完成後系統會回覆: CertReq: Request Created
在同層資料夾下可以看見剛剛產生的certReq.req - 以記事本開啟此certReq.req,可以看見一堆像亂碼的文字放在
"-----BEGIN NEW CERTIFICATE REQUEST-----" 跟
"-----END NEW CERTIFICATE REQUEST-----" 兩段文字中間,
將整個內容copy下來,接下來的步驟就比較熟悉了。 - 開啟內部核發憑證的伺服器 http://serverName/certsrv
依序點選: 要求憑證 > 提交進階憑證要求 > 用 Base-64 編碼的CMC或PKCS #10檔案來提交憑證要求,或用Base-64編碼的PKCS #7檔案提交更新要求。
最後將剛剛copy的整串字貼上,點選"提交 >", 最後將憑證下載回來。 - 開啟MMC(run> mmc),打開憑證嵌入式管理單元(電腦帳戶),如下:
- 在"個人"那一層匯入剛剛取得的憑證:
- 完成!!!! 只完成憑證的部分= =b
[NewRequest]
Subject = "CN=host.domain.com"
KeySpec = 1
KeyLength = 1024
Exportable = TRUE
MachineKeySet = TRUE
UseExistingKeySet = FALSE
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
ProviderType = 12
RequestType = PKCS10
KeyUsage = 0xa0
[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1





剩下就給他"下一步","確定"之類的完成。

設定Reporting Server 使用SSL連線
(... 好懶的寫了) 其實就是照著文件Ref#1 做就行了,但是之前憑證裝好,照著步驟做完設定之後,還是無法以https連上reportServer... 關鍵在當初申請憑證時的名稱... 似乎需要使用完整電腦名稱,這個東西小小的寫在Reporting Services組態管理員的help裡...
Ref:
3:30:00 PM | Filed Under certreq, reporting service | 0 Comments

