SPNote

SharePoint Notes

Service Unavailable in SharePoint Sites

While I was upgrading my solution which includes 3 features, I got the error that STSADM couldn't find the original folder of one of the feature cause I've just changed it... (This means -upgradesolution option doesn't take care of folder name changing) Anyways, I just stopped the upgrading process of the batch file (Ctrl + C). But when I came back to the Site again, the site showed me the message "Service Unavailable".

[The error message when I changed the folder name]
The solution can not be deployed.  The feature '877baf7b-e8bc-4f5d-a833-05295f95
961a' uses the directory "SOILTypes" in the solution. However, it is curre
ntly installed in the farm to the directory "SOILResources". Uninstall the exist
ing feature before you install a new version of the solution

After it happened, simply I took actions and they were
1. Look into EventViewer (Nothing for this)
2. IISRESET
3. Reboot
But the result was same. The site prints "Service Unavailable".
ㅠㅠ (This means crying... it's one of the Korean Vowels)

Googling on this problem, I found the answer for this. The website in Application Pools was stopped and I set the admin account again. That's it!!! Now I can see my beautiful? site again...

[Refer Images]


[Service Unavailable]


[Application Pool is stopped]


[Set Admin account]

[Refer URLs Below]
http://grumpywookie.wordpress.com/2007/12/28/service-unavailable/
http://guru-web.blogspot.com/2007/10/central-administration-site-service.html

타나토노트 Thanatonaute

타나토노트 thanatonaute 는 죽음을 뜻하는 그리스 어 타나토스 thanatos 와
항해자를 뜻하는 나우테스 nautes 를 합쳐 만든 조어로서, 우리말로 하면
영계 탐사자 쯤으로 이해할 수 있다.

우리의 죽음 뒤에 무엇이 있을까?
정말 천국과 지옥이 있을까? 아님 아무것도 없을까?

개인적으로는 종교를 믿지 않기에…
후자에 손 들어주고 싶다.

하지만 만약 있다면? 아마도 권선징악에 따른 보상 심리가
사람에겐 기본적으로 내장?하고 있기에 그렇게 생각하는 것은 아닐까?

한 일생을 저울질하여 평가를 받는다면,
나는 어떻게 살아야할까?

스스로가 택하는 바가 아닌 좋은 점수만 받기 위해
행동하는 자신은 무슨 의미가 있을까?

점점 획일화되고 있는 세상에서
줏대 없이 따라하는 똑같음을 비판하는 것은 아닐까?

Workflow Code Snippets

When the workflow code snippets are not loaded in Visual Studio (especially VS 9.0),

[Instruction]
1. Go to Tools > Code Snippets Manager
2. Change the language to XML
3. Add
- Workflow snippet for VS 8.0:
  %Program Files%\Microsoft Visual Studio 8\Xml\1033\Snippets\SharePoint Server Workflow
- Workflow snippet for VS 9.0:
  %Program Files%\Microsoft Visual Studio 9.0\Xml\1033\Snippets\SharePoint Server Workflow

If you have done the instruction, go back to your feature or workflow xml file and press Ctrl + K, X and select SharePoint Server Workflow then you could see five options you can select. They are Element File Tag, Feature.xml Code, Modification Form Tag, Task Form Tag, Workflow.xml Code.

[Note]
Even though I installed OfficeServerSDK.exe but the workflow code snippets are not loaded automatically on Visual Studio 9.0 (2008). I looked through paths between 8.0 and 9.0 and I found out the SharePoint Server Workflow folder wasn’t copied to 9.0. So I just copied it to 9.0 and done!!! It worked as I expected.

If you didn’t install VS 8.0 on your pc then you can post your comment here then I’ll upload those files into zip for you. Or maybe there is a SDK for VS 9.0 so you can search on MSDN downloads.

캐나다 생활 관련 참조 사이트

1. 영문 주소 변환 서비스
 - 우정사업본부 > 국내 우편 온라인 조회 이후 검색어에 해당사양 입력
 - http://www.koreapost.go.kr/servlet/kpp.post.PostInfo

2. Human Resources and Skills Development
 - SIN 에 관한 정보를 얻을수 있습니다.
 - http://www.hrsdc.gc.ca/en/cs/comm/hrsd/whats_new.shtml
 - http://www.hrsdc.gc.ca/asp/gateway.asp?hr=en/cs/sin/030.shtml&hs=sxn#q1

3. Canada Map
 - http://listingsca.com/maps.asp

4. TravelCanada - 캐나다 관광청
 - 캐나다 정보 파악엔 최고의 사이트
   각 주와 해당 지역에 따른 설명과 Culture, Festival & Events, Outdoor,
   Touring, Winter 등 Travel Plan 쓰기에 좋은 website 입니다.
 - http://www.keepexploring.ca/tc_redesign/app/en/ca/home.do

5.  About Toronto
 - Toronto 에 대한 정보를 얻을때
 - http://www.torontotourism.com/Visitor

6. Winnipeg.ca
 - When I want to find about information of Winnipeg
 - http://www.winnipeg.ca/census/2001/

Attach JavaScript Functions to the onload event of body on SharePoint pages

As you all know that SharePoint is tricky to do things in comparison with Plain ASP.NET. Even though it's not easy but if you study it instead of implement what you want yourself, you can use functions which SharePoint provides and one of them is "spBodyOnLoadFunctionNames array" which is SharePoint provides a way to add your events to onload. Here's a usage below.

[code:js;ln=on]

// Usage
_spBodyOnLoadFunctionNames.push(”YourFunctionToAdd“);

[/code]

If you didn't know about it or if you want that onload event but you need to implement then use this below.
From JavaScript: The Definition Guide, Flanagan, O’Reilly

[code:js;ln=on]

/*
 * runOnLoad: portable registration for onload event handlers.
 * this source from JavaScript, The Definition Guide,  Flanagan, O'Reilly
 */
function runOnLoad(f) {
    if (runOnLoad.loaded) f();    // If already loaded, just invoke f() now.
    else runOnLoad.funcs.push(f); // Otherwise, store it for later
}
 
runOnLoad.funcs = [YourFunctionToAdd]; // The array of functions to call when the document loads
runOnLoad.loaded = false; // The functions have not been run yet.
 
// Run all registered functions in the order in which they were registered.
// It is safe to call runOnLoad.run() more than once: invocations after the
// first do nothing. It is safe for an initialization function to call
// runOnLoad() to register another function.
runOnLoad.run = function() {
    if (runOnLoad.loaded) return;  // If we've already run, do nothing
 
    for(var i = 0; i < runOnLoad.funcs.length; i++) {
        try { runOnLoad.funcs[i](); }
        catch(e) { /* An exception in one function shouldn't stop the rest */ }
    }
 
    runOnLoad.loaded = true; // Remember that we've already run once.
    delete runOnLoad.funcs;  // But don't remember the functions themselves.
    delete runOnLoad.run;    // And forget about this function too!
};
 
// Register runOnLoad.run() as the onload event handler for the window
if (window.addEventListener)
    window.addEventListener("load", runOnLoad.run, false);
else if (window.attachEvent) window.attachEvent("onload", runOnLoad.run);
else window.onload = runOnLoad.run;

[/code]

but the above one is much simple and easy to use in SharePoint. You can use this for regular HTML or .NET pages.

Guid.ToString(”B”).ToUpper() means???

When you want print out GUID like this format
{855F9A70-9A43-435B-A5B1-B91A7F58BAD1} => bracket surrounded….
you can use that one.

For example, Guids of SPlist or SPField  
guid.ToString(”B”).ToUpper();

[Sample Code here]:
[code:c#;ln=on]

string strGuid = "0b51264d-baa6-49dc-8970-1d24979053ac";
Guid guid = new Guid(strGuid);
string guidBTest1 = guid.ToString();
string guidBTest2 = guid.ToString("B").ToUpper();
Response.Write(guidBTest1 + "");
Response.Write(guidBTest2);

[/code]

[In Detail]
The format parameter can contain the following format specifiers. In the table that follows, all digits in the return value are hexadecimal. Each character ‘x’ represents a hexadecimal digit; each hyphen (’-'), bracket (’{', ‘}’), and parenthesis (’(', ‘)’) appears as shown.

SpecifierFormat of Return Value
N 32 digits:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
D 32 digits separated by hyphens:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
B 32 digits separated by hyphens, enclosed in brackets:
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
P 32 digits separated by hyphens, enclosed in parentheses:
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

The provider parameter is reserved for future use and does not contribute to the execution of this method. A null reference can be coded for this parameter.

- Reference from http://msdn.microsoft.com/en-us/library/s6tk2z69.aspx