何小碩's profileGet More... ExperiencePhotosBlogListsMore Tools Help

Blog


    January 31

    Microsoft Filter Pack Released to Web

    此 IFilter Pack 支援下列格式:

    .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx

    1. 下載
    2. 個產品安裝設定

    Description of the SharePoint Server 2007 issues that are fixed by the 2007 Microsoft Office servers Service Pack 1

    SUMMARY

    Microsoft has released the 2007 Microsoft Office servers Service Pack 1 (SP1). This service pack contains fixes for Microsoft Office SharePoint Server 2007.

    Back to the top

    INTRODUCTION

    The 2007 Microsoft Office servers SP1 provides the latest updates to SharePoint Server 2007. The 2007 Microsoft Office servers SP1 contains improvements in security, in stability, and in performance.

    Some fixes that are included with the 2007 Microsoft Office servers SP1 were previously released in separate updates. The 2007 Microsoft Office servers SP1 combines the previously released fixes into one update.

    For more information about the 2007 Microsoft Office servers SP1, click the following article number to view the article in the Microsoft Knowledge Base:
    936984 (http://support.microsoft.com/kb/936984/) Description of the 2007 Microsoft Office servers Service Pack 1 and the 2007 Microsoft Office servers Language Pack Service Pack 1

    Back to the top

    MORE INFORMATION

    Downloadable list of issues that the service pack fixes

    A Microsoft Excel workbook is available that contains a list of the fixes for SharePoint Server 2007.

    Note The workbook is in the English language. The workbook will not be translated into any other languages

    The following file is available for download from the Microsoft Download Center:
    DownloadDownload the 2007 Office Servers Service Pack 1 Changes_all.xls package now. (http://download.microsoft.com/download/B/C/F/BCFBEC81-ED9E-40A3-BBF0-1410B67A365A/2007 Office Servers Service Pack 1 Changes_all.xls) Release Date: December 11, 2007

    For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
    119591 (http://support.microsoft.com/kb/119591/) How to obtain Microsoft support files from online services
    Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

    Back to the top

    Issues that the service pack fixes

    The 2007 Microsoft Office servers SP1 fixes the SharePoint Server 2007 issues that are described in the following articles in the Microsoft Knowledge Base:
    934793 (http://support.microsoft.com/kb/934793/) Description of the SharePoint Server 2007 hotfix package: April 12, 2007
    932919 (http://support.microsoft.com/kb/932919/) Description of the SharePoint Server 2007 hotfix package: February 26, 2007
    934790 (http://support.microsoft.com/kb/934790/) Description of the Windows SharePoint Services 3.0 hotfix package: April 12, 2007
    939077 (http://support.microsoft.com/kb/939077/) Description of the SharePoint Server 2007 hotfix package for SharePoint Server 2007 and for SharePoint Server 2007 for Search: June 24, 2007
    939654 (http://support.microsoft.com/kb/939654/) Description of the SharePoint Server 2007 hotfix package: June 29, 2007
    936877 (http://support.microsoft.com/kb/936877/) Description of the SharePoint Server 2007 hotfix package for SharePoint Server 2007 and for SharePoint Server 2007 for Search: May 8, 2007
    937207 (http://support.microsoft.com/kb/937207/) Description of the SharePoint Server 2007 hotfix package: May 15, 2007
    937904 (http://support.microsoft.com/kb/937904/) Description of the SharePoint Server 2007 hotfix package: May 25, 2007
    937208 (http://support.microsoft.com/kb/937208/) Description of the SharePoint Server 2007 hotfix package: May 15, 2007
    936867 (http://support.microsoft.com/kb/936867/) Description of the Windows SharePoint Services 3.0 hotfix package: May 8, 2007
    938535 (http://support.microsoft.com/kb/938535/) Description of the SharePoint Server 2007 hotfix package: June 11, 2007
    938537 (http://support.microsoft.com/kb/938537/) Description of the SharePoint Server 2007 hotfix package: June 12, 2007
    939599 (http://support.microsoft.com/kb/939599/) Description of the SharePoint Server 2007 hotfix package: June 29, 2007
    937901 (http://support.microsoft.com/kb/937901/) Description of the Windows SharePoint Services 3.0 hotfix package: May 25, 2007
    938182 (http://support.microsoft.com/kb/938182/) Description of the SharePoint Server 2007 hotfix package for SharePoint Server 2007 and for SharePoint Server 2007 for Search: May 31, 2007
    937906 (http://support.microsoft.com/kb/937906/) Description of the SharePoint Server 2007 hotfix package: May 25, 2007
    This service pack also fixes the following issues that were not previously documented in a Microsoft Knowledge Base article:
    Any author-time action in Mozilla Firefox 2.0 does not finish when that action involves a particular SharePoint Server 2007 dialog box

    In Firefox 2.0, any author-time action does not finish when that action involves a SharePoint Server 2007 dialog box that lets you perform the following actions:
    Edit the HTML source code of a given HTML field
    Select assets such as an image or a link
    Perform a state action, such as "check-in," "submit for approval," or "approval"
    This issue also occurs when any Microsoft Windows SharePoint Services or SharePoint Server 2007 dialog box passes non-string values back to the caller.
    The spelling checker does not work on a computer that is running Windows Server 2008

    When you try to use the spelling checker on a computer that is running Windows Server 2008, the spelling checker does not work. Additionally, you receive the following error message:
    Spelling did not complete properly. If the problem persists contact your administrator.
    Caching is effectively disabled when anonymous and authenticated users access a page at the same time

    If a page is enabled for anonymous and authenticated users, and if the users of these two access methods access the same page one after the other, caching is effectively disabled.
    A search index backup fails if crawl enumeration for a crawl or for a profile import process is in progress

    You start a regularly scheduled crawl or a profile import process. If a search index backup operation occurs during the import process, the search index backup operation fails.
    SharePoint Server 2007 cannot search or index public folders in Microsoft Exchange Server 2007

    Public folders in Exchange Server 2007 cannot be searched or indexed. This issue occurs because Microsoft Office Outlook Web Access support was removed for Exchange Server 2007.
    By default, some vendor-specific wordbreakers are disabled

    By default, the following vendor-specific wordbreakers are disabled. You will not see expected results for some queries in the following languages:
    Czech
    Danish
    Finnish
    Greek
    Hungarian
    Polish
    Turkish
    This issue occurs if the language-specific wordbreaking behavior differs from that of the multilanguage wordbreaker.
    New standardized characters in Romanian cause incorrect matching for search queries

    New characters have been introduced in the Romanian language. The search behavior for these characters is incorrect. The characters cause incorrect matching for search queries.
    The Office Server Search service cannot serve queries

    You start the Office Server Search service on a new server that is intended to serve queries. The user interface indicates that the service has started. However, the initialization process never finishes. Therefore, the service cannot serve queries.

    Sometimes, even if the initialization process succeeds, crawls may not continue. This issue occurs because the search service on the indexer cannot receive notification when a new server is added.
    You cannot issues queries in a Czech locale on a 64-bit version of SharePoint Server 2007

    The Czech wordbreaker (Huczlr.dll) does not load, and it causes the search service to stop responding. Therefore, 64-bit versions of SharePoint Server 2007 cannot index documents in Czech. Additionally, you cannot issue queries in a Czech locale.
    Webs and sites that have a period (.) in their names are incorrectly excluded

    Webs and sites that have a period (.) in their names are incorrectly excluded by the gatherer because of exclusion rules. Therefore, you may miss the content in that Web.
    Query servers slow down or stop

    When two query servers start a master merge at the same time, both query servers slow down or stop completely. Therefore, the queries may take from one to five seconds to display an error message, may time out, or may take a very long time to finish.
    A memory leak occurs in the MSSearch.exe process if the EnableStemming setting is set to "true"

    If you query the Web service, and if you set the EnableStemming setting to "true," a memory leak occurs in the MSSearch.exe process on the query server.

    Memory consumption increases until the MSSearch.exe process uses about 2 gigabytes (GB) of memory. Then, the query server starts to remove itself from the SharePoint Server 2007 application pool.
    The Advanced Search feature does not work when you use the "created date" property

    You perform a query from the Advanced Search page to view all objects that were created after a specified date. When you do this, no sites are returned in that query.
    SharePoint Server 2007 cannot exclude content during a crawl that is behind a complex URL

    You cannot exclude a subset of URLs that are differentiated by a parameter in the query string part of the URL. For example, http://zoo/bar.html?p=zoo is to be excluded, but http://zoo/bar.html?p=bar is to be crawled.
    The results that the Advanced Search feature returns do not contain keywords as expected

    If you enter an Advanced Search query in the top two fields, the returned results contain keywords from either of these fields. However, you expect the results to contain keywords from both fields.
    Error message when you try to add or to edit best bets for a keyword: "Error: Access denied"

    You are an administrator of a non-root site, but you are not the administrator of the root site. When you try to add or to edit best bets for a keyword in the site administration page of the non-root site, you receive the following error message:
    Error: Access denied.
    The search service stops responding when you try to enable stemming during the query time in the Greek version of SharePoint Server 2007

    Users in Greece want to index and to query for documents in Greek on a computer that is running SharePoint Server 2007. When the users try to enable stemming during the query time, the search service stops responding.
    The SP1 version of the Metro IFilter no longer lets you index compressed (.zip) files or .xlsb files

    After you install the SP1 version of the Metro IFilter, you cannot index .zip files or .xlsb files.
    You cannot configure single sign on (SSO) on a computer that is running Windows Server 2008

    You try to visit the following Web site on a computer that is running Windows Server 2008:
    http://servername/_admin/SSO/manageserver.aspx
    When you do this, the site is never displayed. Therefore, you cannot configure single sign on (SSO).
    The URL field is not left-to-right on the related links settings page

    You use the related links settings page to add URLs that appear as related links. The URL for this page is as follows:
    http://servername/ _layouts/RelLinksScopeSettings.aspx
    However, in right-to-left builds, the text box for entering URLs is not left-to-right.
    A small font is displayed on the "My Profile" page

    You run the Traditional Chinese (CHT) or the Simplified Chinese (CHS) version of SharePoint Server 2007. In this case, the CHT or CHS characters in certain properties on the "My Profile" page, such as Title, Office, and Telephone, are too small to read.
    Private or public pages under "My Site" load very slowly
    An upgraded listing Web Part is not rendered

    If the regional setting is a non-English locale, and if the Web Part is grouped by modified date, an upgraded listing Web Part is not rendered.
    Users who are missing from an import are not marked for deletion after you upgrade Microsoft Office SharePoint Portal Server 2003 to SharePoint Server 2007

    After you upgrade SharePoint Portal Server 2003 to SharePoint Server 2007, you perform an import operation. However, during the import operation, some users are missed.

    These missing users are not marked for deletion. Therefore, these users are not deleted from the user profile, and the "My Site" page is not cleaned up.
    The Preview pane displays the contents of private messages to a delegate who uses the "regular find" feature

    A mailbox delegate can use the "regular find" feature and the Preview pane to discover and to read private messages. This issue does not occur if the delegate uses the "advanced find" feature.
    Telephone numbers are reversed in right-to-left locales
    Top navigation intermittently displays links for the incorrect user

    When two or more people are using "My Site," the horizontal navigation can mix the requests and can intermittently display links for the incorrect user.
    A "My Site" cleanup job does not clean up deleted users
    A personalization site link does not follow the alternative access mapping

    You create personalization links from the Central Administration page. Then, you log on to "My Site." When you do this, your personalization link does not follow the alternative access mapping.
    Error message when you try to reinstall SharePoint Server 2007: "Error 997"

    You install Windows SharePoint Services 3.0 and then upgrade to SharePoint Server 2007. Then, you uninstall SharePoint 2007. When you try to reinstall SharePoint 2007, the installation fails. Additionally, you receive the following error message:
    Error 997
    Some profile features do not work on a Turkish operating system

    Some profile features, such as Windows SharePoint Services Synchronization, do not work on a Turkish operating system.
    A Lightweight Directory Access Protocol (LDAP) role provider does not cache roles

    The Roles.GetRolesForUser() method queries the provider database even if the CacheRolesInCookie setting is set to "true."
    The LDAP provider supports authenticated LDAP binds

    In a deployment that does not use the Active Directory directory service, customers want to use SharePoint Server 2007 to authenticate against a generic LDAP directory. The LDAP provider supports authenticated LDAP binds.
    The single sign on (SSO) default database server does not work for Windows Server 2008
    An OverflowException that is thrown by the CheckSiteChanges() binary large object (BLOB) cache causes the portal to crash

    You enable BLOB caching on one of your Web sites. Then, you perform a throughput test or some search crawl tests. After you do this, an OverflowException is thrown by the CheckSiteChanges() BLOB cache. The OverflowException causes the portal to crash.
    The Project Web Access home page shows an unexpected error on a computer that is running Windows Server 2008

    If Shared Web services are broken, the Project Web Access home page shows an unexpected error on a computer that is running Windows Server 2008.
    When you try to change master page settings on Topics subsites, the settings are not updated

    You upgrade a SharePoint Portal Server 2003 portal to a SharePoint Server 2007 portal. When you try to change master page settings on Topics subsites, the settings are not updated.
    "My Site" blogs that have comments cannot be searched

    When you try to search and find some blog posts, "My Site" blogs that have comments cannot be searched.
    On "My Site," personal documents that are created by using a language other than the default language have the same permissions as shared documents

    You create a "My Site" page in a SharePoint Server 2007 installation that has a language pack installed. You create the "My Site" page in one of the languages in the language pack.

    When you do this, the permissions for personal documents on the "My Site" page are incorrect. The personal documents have the same permissions as the shared documents.
    You cannot migrate Microsoft Content Management Server 2002 content to a computer that is running a 64-bit version of SharePoint Server 2007

    When you try to migrate Content Management Server 2002 content to a computer that is running a 64-bit version of SharePoint Server 2007, the migration fails. Additionally, you may receive the following error message:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    You cannot start Microsoft Excel services or Microsoft Project Server services on a computer that is running Windows Server 2008

    You cannot start Excel and Project Server services from the Services on Server page on the SharePoint Server 2007 Central Administration page.
    Query results are not correctly sorted by property when the number of results is small

    You issue a query that uses free text restriction and then order the results by property. When you do this, you may receive the results in the wrong order if the number of results is small. For example, this issue may occur if there are fewer than 20 results.
    The "Scope" property of the CoreResultsWebPart class does not affect the search query that the Web Part runs, and the predefined scope is ignored

    You implement a search center that has several tabs. Each tab contains an advanced SearchWebpart class that has a separate results page. Each results page contains a CoreResultsWebPart class that has the Scope property set to the scope of the tab in the search center.

    However, the Scope property of the CoreResultsWebPart class does not affect the search query that the Web Part runs. The predefined scope is ignored.
    No search results are returned when you use Forms-based authentication

    When you use Forms-based authentication, no search results are returned. However, when you use NTLM authentication, search results are returned.
    A gradual upgrade fails if the profile or service database spans more than one data file or log file

    If the profile or service database is configured to span multiple data or log files, a gradual upgrade from SharePoint Portal Server 2003 to SharePoint Server 2007 fails. Therefore, you cannot upgrade the shared services by using the gradual upgrade method.
    The first full crawl does not index sites that have a period (.) in their name

    An incremental crawl indexes sites that have a period in their name. However, the first full crawl does not index these sites. Additionally, no change occurs if you reset the index.
    You cannot revert a property to the default type

    You set the Include values from all crawled properties mapped setting. Then, you remap the Author property to additional crawled properties. When you do this, the type changes from the default text type to an object type.

    If you do not set the Include values from all crawled properties mapped setting, the object type does not revert as expected.

    Back to the top

    Error signature details

    When you use SharePoint Server 2007, you may receive an error message that resembles the following error message:
    Microsoft Office SharePoint Server 2007 has encountered a problem and needs to close. We are sorry for the inconvenience. To see what data this error report contains, click here
    The error report contains an error signature that resembles the following error signature.
    Application name Application version Module name Module version Offset
    Mssearch.exe 12.0.4518.1015 Tquery.dll 12.0.4518.1015 101062
    Note Other program versions, module versions, and offsets are possible.

    The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

    文件庫.清單 參數設定

    • First day of the week for a given date: =[Start Date]-WEEKDAY([Start Date])+1
    • Last day of the week for a given date: =[End Date]+7-WEEKDAY([End Date])
    • First day of the month for a given date: =DATEVALUE("1/"&MONTH([Start Date])&"/"&YEAR([Start Date]))
    • Last day of the month for a given year (does not handle Feb 29). Result is in date format:

      =DATEVALUE
      (CHOOSE(MONTH([End Date]),31,28,31,30,31,30,31,31,30,31,30,31)
      &"/" & MONTH([End Date])&"/"&YEAR([End Date]))

    • The name of the month for a given date - numbered for sorting - e.g. 01. January:
      =CHOOSE(MONTH([Date Created]),"01. January", "02. February", "03. March", "04. April", "05. May" , "06. June" , "07. July" , "08. August" , "09. September" , "10. October" , "11. November" , "12. December")

    Talking about Send Link in Email can cause problem if site URL has - e.g. my-portal.com

     

    Quote

    Send Link in Email can cause problem if site URL has - e.g. my-portal.com

    I am not sure but once I saw such post few months back explaining this but if you have a - in your moss portal link or dns, your send link in email functionality will not work properly because IE change the - to %2d.  To fix this issue you need to edit core .JS file

    Core.js file is placed at

    System Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033

    Open Core.js in notepad

    If you have customized core.js before this search for L_SendToEmail_Text

    if you have not customized core.js simply jump to line 3309

    image

    all you need to do is to encode the url to show - instead of %2d.  unescapeProperly method encodes the URL.

    Simple press enter on line 3309

    fileUrl = unescapeProperly(fileUrl);

    If you wanted to test it add alert before and after fileURL variable.

    Save Core.js and Refresh the page.

    Go to a document library and using document drop down click Send To -> Send Link in Email

    I hope this will solve your problem.

    Jerry

    MOSS 2007 Illegal Site Name Characters

    Description

    Character

    Ampersand

    &

    Angle brackets

    < >

    Asterisk

    *

    Backslash

    \

    Vraces

    { }

    Colon

    :

    Number Sign

    #

    Percent

    %

    Period

    .

    Pipe

    |

    Plus Sign

    +

    Question Mark

    ?

    Quotation Mark

    "

    Slash

    /

    Tilde

    ~

    Underscore

    _

    To add a google gadget to a SharePoint page

    • Go to the google gadgets site(http://www.google.com/ig/directory?synd=open) and find the one you want and click on the title.
    • Then just click the add to your webpage button.

    • Adjust the available settings to your likings and click the “Get the code” button. Copy the code it generates to the clipboard.

    • Now go to your SharePoint site and add new content editor web part the page you want the gadget on.

    • Click the web part menu (little triangle in the top right) of the content editor web part and go to Modify shared web part.

    • In the tool pane click the source editor button and then paste the contents of your clipboard in the window that appears. Click Save on the pop and then OK on the tool pane.

    上傳附加檔到清單附件(Code)

        /// =============================================================
        /// 上傳附加檔
        /// =============================================================
        ///

        SPSite oSite = new SPSite("http://lab:27094/Docs/");
        SPWeb web = oSite.OpenWeb();

        SPList list = web.Lists["FileAttachment"];

        web.AllowUnsafeUpdates = true;
        SPListItem item = list.Items.Add();

        item["Title"] = "FileAttachment";

        DirectoryInfo d = new DirectoryInfo(@"c:\temp\");
        FileInfo[] files = d.GetFiles();
        foreach (FileInfo f in files)
        {

              FileStream fs = new FileStream(f.FullName, FileMode.Open, FileAccess.Read);
              BinaryReader br = new BinaryReader(fs);
              Byte[] ByteFile = br.ReadBytes((int)f.Length);

              SPAttachmentCollection oA = item.Attachments;
              oA.Add(f.FullName, ByteFile);

        }
        item.Update();
        web.AllowUnsafeUpdates = false;

        /// End

    }

    January 29

    顯示天氣

    1. 加入 RSS 網頁組件...
    2. 貼上下列網址在 RSS 網頁組件中 ( p = Zip Code )

    http://weather.yahooapis.com/forecastrss?p=94089

    Reference: http://developer.yahoo.com/weather/

    January 25

    Talking about MOSS 2007 中 MasterPage 裡面所有預留位置列表

     

    Quote

    MOSS 2007 中 MasterPage 裡面所有預留位置列表
    //此篇文章參考:http://maxensehenry.blogspot.com/
     
    下面列出了sharepoint的母版頁中定義的所有預留位置:(詳細位置請對照default.master)

    1、<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigationSiteMap" runat="server" />

    放置連接到頂級網站的超連接

    2、<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigation" runat="server" />

    放置頂部一行內容。

    3、<asp:ContentPlaceHolder ID="PlaceHolderSiteName" runat="server" />

    放置網站名稱

    4、<asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server" />

    放置搜索框

    5、<asp:ContentPlaceHolder ID="PlaceHolderHorizontalNav" runat="server" />

    放置水準巡覽列

    6、<asp:ContentPlaceHolder ID="PlaceHolderTopNavBar" runat="server" />

    放置水準巡覽列一行內容。

    7、<asp:ContentPlaceHolder ID="WSSDesignConsole" runat="server" />

    頁面編輯控制項,當頁面進入編輯頁面模式時使用(當我們點 Site Actions, Edit Page後)

    8、<asp:ContentPlaceHolder ID="SPNavigation" runat="server" />

    在 Windows SharePoint Services中默認為空,用於附加的頁面編輯控制項

    9、<asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" />

    左側的圖片

    10、<asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" />

    Title區左側邊框

    11、<asp:ContentPlaceHolder ID="PlaceHolderTitleBreadcrumb" runat="server" />

    TitleBreadcrumb頁面導航區

    12、<asp:ContentPlaceHolder ID="PlaceHolderPageTitleInTitleArea" runat="server" />

    Breadcrumb區下面的標題

    13、<asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" />

    一個放置頁面級命令的地方,比如在WIKI網站裡的Edit Page, History, Incoming Links

    14、<asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server" />

    Title區右側空白

    15、<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" />

    TitleAreaSeparator區

    16、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarDataSource" runat="server" />

    左側導航區資料來源

    17、<asp:ContentPlaceHolder ID="PlaceHolderCalendarNavigator" runat="server" />

    在頁面中有日歷時為其顯示一個日期選擇框

    18、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarTop" runat="server" />

    左側導航區上面的導航區

    19、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBar" runat="server" />

    左側導航區

    20、<asp:ContentPlaceHolder ID="PlaceHolderLeftActions" runat="server" />

    左側導航區下面的動作區

    21、<asp:ContentPlaceHolder ID="PlaceHolderNavSpacer" runat="server" />

    左側導航區的寬度

    22、<asp:ContentPlaceHolder ID="PlaceHolderLeftNavBarBorder" runat="server" />

    左側導航區的邊框元素

    23、<asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" />

    頁面body的邊框元素

    24、<asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />

    頁面描述區

    25、<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />

    頁面主體

    26、<asp:ContentPlaceHolder ID="PlaceHolderBodyRightMargin" runat="server" />

    頁面body的右邊空白

    27、<asp:ContentPlaceHolder ID="PlaceHolderFormDigest" runat="server"/>

    這是頁面中必備的 "form digest"安全性群組件。

    28、<asp:ContentPlaceHolder ID="PlaceHolderUtilityContent" runat="server" />

    頁面底部需要的一塊特殊內容

    29、<asp:ContentPlaceHolder ID="PlaceHolderBodyAreaClass" runat="server" />

    附加在頁面頂部的body中的樣式

    30、<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaClass" runat="server" />

    TitleArea附加的樣式

    31、<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />

    提供給內容頁添加所有可以放在<head>區域的內容,如CSS、JS等。

    January 24

    一個文件庫使用多個 EventHandler

    Take the first document library event handler, inherit from the second.  Add your code to do what ever you need to.  Call your base class.

    E.g:

    public class MyHandler : SecondHandler, IListEventSink
    {

       .
       .
       .

       public void OnEvent(SPListEvent event)
       {

          base.OnEvent(event);

       }
    }

    利用 EventHandler 觸發 MOSS 2007 流程

     SPUser person = ...; // TODO: get your user
      // TODO: get correct list item (or use properties.ListItem inside your event handler)
      SPWorkflowManager manager = listItem.Web.Site.WorkflowManager;
      SPWorkflowAssociationCollection associationCollection = listItem.ParentList.WorkflowAssociations;
      foreach (SPWorkflowAssociation association in associationCollection)
      {
        // TODO: find the correct workflow association in the list:
        if (association.Name.ToLower().Equals("myworkflow") == true)
        {
          String data = association.AssociationData;
          if (person != null)
          {
            data = association.AssociationData.Replace(
              "<my:CC></my:CC>",
              "<my:CC><my:Person><my:DisplayName>" +
              person.Name + "</my:DisplayName><my:AccountId>" +
              person.LoginName + "</my:AccountId><my:AccountType>User</my:AccountType></my:Person></my:CC>");
          }
          // Hit the go!
          SPWorkflow wf = manager.StartWorkflow(listItem, association, data, true);
        }
      }

    How to Debug a Custom OWSTimer Job

    Recently I had a requirement to provide the ability for files dropped in a document library by an automated process to be copied to a specific user's My Site in SharePoint 2007.  The challenge was simple enough in concept.  The approach was to write and deploy a custom Event Handler into MOSS that would copy the file that was just added to a specific source document library to a destination document library on a user's My Site.  If the user did not have the document library, the event handler would take some time to provision one.  The event handler would determine the destination My Site by looking at the name of the containing folder for the files in the source document library.

    The challenge is that the legacy system writing to the document library would be writing through WebDav.  MOSS event handlers don't catch WebDav events based on the fact that MOSS eventing is largely built on ASP.NET's model.  Thus, when I attempted to add an item to the document library through the UI, the event handler caught the addition, and copied the file.  However, when I attempted to do this through WebDav, the event handler did not fire.

    I evaluated several alternatives, including a Windows Service to monitor the WebDav location with a .NET FileSystemWatcher (which I'm not sure if that would have even worked :)), and an Http handler that would have been placed in the SharePoint virtual directory that intercepted and decoded the complex and poorly documented WebDav operations to see if files were added and where.  I also considered a custom OWSTimer job that would run, like a service, and work with the MOSS object model.

    I chose the OWSTImer job because I could deploy into MOSS as a feature, have a OOB interface for deployment/retraction as well as an existing service with instrumenting, the ability to enable and disable the job, and I didn't have to write a service .  I was able to take my event handler class and port it to a new project in which I created a new class library with a class that derived from SPJobDefinition.  I also created a feature receiver for it in the same assembly and then deployed the assembly.  The feature activation code cleaned up any existing instances of the job it found as well as installed a new definition.  Thus, the job became visible in the Time Job Definitions page and I was able to enable/disable it from there. 

    However, the real challenge came when I tried to debug the job execution.  The challenge is that instead of attaching to the w3wp.exe process, jobs run in the OWSTIMER process.  However, merely attaching to that process didn't yield the same results.  Thus, what I had to do was the following:

     

    1. In the Execute method of the job (the method you override to write your job execution logic) place the following code (Thanks Joe!):  System.Diagnostics.Debugger.Break();
    2. Assuming you have already added your solution to the site and deployed it using Central Admin, simply uninstall the job assembly from the GAC and add the newly built one back in again
      1. What I did here is to stop the OWSTIMER service (to prevent my job from running a million times while I do these steps)
      2. Remove and copy the job assembly to the GAC
      3. Map the GAC folder so you can actually see the files to place the .pdb file in for debugging using subst Z C:\Windows\Assembly (this command run from the command prompt maps the file structure of the windows assembly folder to the z:\ drive so you can copy your assembly into the Z:\GAC_MSIL\MyAssembly\10000___StrongNameKey\ folder
    3. Reset IIS and restart the OWSTIMER service
    4. Quickly attach your VS.NET debugger to the OWSTIMER process and wait for your job to kick off inside OWSTIMER.  The debugger will break on the System.Diagnostics.Debugger.Break(); allowing you to step through your job

    Remember to remove the System.Diagnostics.Debugger.Break(); line before you go to production, or the OS will attempt to present you with a debugging option, even if VS.NET is closed.  Be judicious about disabling your job if you are going to continue development.

    Posted: Wednesday, October 17, 2007 10:48 AM by echarran

    如果要用程式去更改 MOSS 網站的 Web.Config

    SPWebConfigModification Properties (Microsoft.SharePoint.Administration)
    Public Properties
      Name Description
    Public property Name Gets or sets the name of the attribute or section node that should be set.
    Public property Owner Gets or sets the owner of the web.config modification.
    Public property Path Gets or sets the XPath expression that is used to locate the node that is being operated on.
    Public property Sequence Gets or sets the sequence number of the modification.
    Public property Type Gets or sets the type of modification that is implied by the class.
    Public property UpgradedPersistedProperties  Gets the collection of field names and values for fields that were deleted or changed. (inherited from SPAutoSerializingObject)
    Public property Value Gets or sets the value of the item to set.

    MOSS 2007 Caching 有三種

    Use this type of caching… At the… Notes

    Output Caching and Cache Profiles

    Individual page level

    Includes extending caching using VaryByCustomString

    Object Caching

    Individual Web Part control, field control, and content level

    Includes cross-list query caching and navigation caching

    Disk-based Caching for Binary Large Objects

    Individual binary large object (BLOB) level and caches images, sound, movies, and code

    Supports .gif, .jpg, .js, .css, and other image, sound, and code files that are stored as binary large objects

    使用 MOSS 2007 Feature 操作 Event Handler

    To register event handler for list events , create folder in the \template\features folder named "EventFeature" which contain a feature.xml file that specifies the scope and ID of the "feature" and element .xml file that the former file references.The feature file might look like the following :

    < Feature>
       < Scope="Web" Title="Event handler" Id="Create a GUID" xmlns="http://schemas.microsoft.com/sharepoint/" >
           < ElementManifests >
                    < ElementManifest location="element.xml" >
           < /ElementManifests>
    < /Feature>


    The element.xml file registers the event handler assembly and associates it with a list type, for announcement list type is 104 as shown below:

    < Elements >
          < Receiver >
              < ListTemplateOwners="name of site definition using which this site is created and this list belongs to" ListTemplateId="104" >
          < Receiver >
          < Name >EventHandler< /Name >
          < Type >2< /Type >
          < SequenceNumber >10000< /SequenceNumber >
          < Assembly > "NameSpace name of assembly" ,version=1.0.0.0,Culture=neutral,PublicKeyToken="public key token of assembly" < /Assembly >
          < /Class >"ClassNameOfAssembly"< /Class >
          < Data >< /Data >
          < Filter >< /Filter >
          < /Receiver >
          < /Receivers >
    < /Elements >


    Once we are done with feature creation ,register feature using stsadm.exe tool present in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN" Run the following command to install feature :

    stsadm -o installfeature -filename EventFeature\feature.xml

    Run the follwing command to activate the feature:

    stsadm -o activatefeature -filename EventFeature\feature.xml -url "url of the site"

    January 21

    SAP MOSS Interop Animation ZIP

    Brief Description

    This overview animation explains options and possibilities as well as limitations in the combination of SharePoint 2007 and SAP NetWeaver.

    http://www.microsoft.com/downloads/details.aspx?familyid=595b6021-58bf-4628-8a27-8f54e7029eea&displaylang=en&tm

    SAP integration with MOSS

    There is a lot of really powerful integration between SAP and MOSS and the awareness about this is really, for some reason, quite low. We've talked about integrating LOB data into SharePoint with the Business Data Catalog but there are some specific capabilities to SAP when brought together with SharePoint that make an enterprise solution rich, user-friendly, and seamless.

    To give you a quick overview of the BDC, it's a way to bring LOB data into SharePoint without writing any code. You just define your entities with an Application Definition File (ADF – of type XML file) which you upload into the SharePoint Central Administration and then reuse throughout your portal as a shared service. You can then surface that LOB data as SharePoint lists, web parts, enterprise search, lists, user profiles and custom applications. It uses either SOAP to connect to the LOB system if it's a traditional one like SAP, or ADO.NET if it's a database system like SQL. In my previous blog post, I mentioned that the latest version of the SDK made available a tool for authoring the ADF file so that you no longer have to work with straight XML.

    How does this register with the SAP web services? The ADF corresponds to the WSDL file of the SAP web service and it must also reference a Single Sign-On application that will manage the credentials of the users. The ADF is then imported into the BDC and once the application is registered, the data can be surfaced in the ways I mentioned above, displaying data from the backend SAP system.

    SAPandMOSS

    So what's so special about SharePoint integration with SAP? First of all, SharePoint has special page redisplay so you can display SAP data inside WebParts residing in SharePoint or custom ASP pages. iViews in SAP are hosted in WSS iView WebParts.

    IntegrationOptions

    One application here would be to show employees in their mySites a view of pending SAP expenses reports.

    A few other integration options:

    • You can use WSRP if you want to create a custom look and feel to your view. It's preferable to URL wrapping since it's a true web service and not simply another system's HTML.
    • You can display entire BSPs in web parts. HTTP or HTTPS is used to access the application across the network so firewalls and proxy servers can be used. SAP portal is not required to execute BSPs.
    • Accessing SAP data using services and bringing it into WSS or the client (e.g. through Enterprise Search, lists, in the client in a custom task pane or custom apps)
    • Surfacing SAP data for analysis – this involves exporting SAP data into a warehouse and then consuming the warehouse using Excel pivotCharts, Excel Services and dashboards

    If you'd like to look into a few more resources on this topic, check out the following:

    Resources for Interoperability with MOSS

    White paper on Integrating MOSS and SAP

    White paper on Integrating SAP BSP into SharePoint

    White paper on How to integrate WSS and Exchange into SAP Enterprise Portal

    ref:http://blogs.msdn.com/joanna_bichsel/archive/2007/09/25/sap-integration-with-moss.aspx

    MOSS 2007 裡面的 IView WebPart

    Using SAP iViews with SharePoint 2007

    One of the easiest ways to integrate SharePoint 2007 to SAP is using a predefined iView from SAP.  Of course this will display the same data and view that you would see in any other system that would display an iView, but it is a good start without any extra coding.

    1. First add an IView web part to the page.
      image
    2. The next step seems like it should be easy.  Open the tool pane and select the trusted SAP portal server as well as the iView. 
      image
    3. The problem is that the first time you are setting up your server you will get an error "No SAP® servers are configured for this site. Contact your administrator to configure trusted SAP® servers."  Don't worry you just need to set up your SAP server locations.
      image
    4. To set up the SAP server create a configuration file with the web location of the SAP server and the SSO application.  If you have the default installation of MOSS this will be under the folder C:\Program Files\Microsoft Office Servers\12.0\Config.  You will notice there is an example configuration file named TrustedSAPHosts.xml.sample, just rename the file to TrustedSAPHosts.config.  This will allow SharePoint to find the registered SAP servers.
    5. Inside of the xml configuration file there are two elements that have to be set: ServerURL (The server with port number of the SAP Server) and the SsoAuthentication (The SSO application in Central Administration site)
      <!-- This is from the config file -->
      <Server Name="SAPServer">
          <ServerURL>http://SAPServer:50100</ServerURL>    
          <SsoAuthentication Name="SAP"/>
      </Server>
    6. Now go back to the web part and open the tool pane once again.  Simply select the SAP server to use and type in the name of the iView to display.
      image

    ref: http://jopx.blogspot.com/

    MOSS 2007 欄位型態列表

      Member name Description
      AllDayEvent Specifies an all day event. Value = 29.
      Attachments Specifies attachments. Value = 19.
      Boolean Specifies Boolean values that are stored in the database as 1 or 0. Value = 8.
      Calculated Specifies calculated values. Value = 17.
      Choice Specifies a predetermined set of values that can be used to enter data into the field. Value = 6.
      Computed Specifies an abstract field type that depends on other fields for its content and definition. Value = 12.
      ContentTypeId Specifies a content type ID. Value = 25.
      Counter Specifies an integer used for internal ID fields. Value = 5.
      CrossProjectLink Specifies a link between projects in a Meetings Workspace site. Value = 22.
      Currency Specifies currency values formatted based on a specific locale. Value = 10.
      DateTime Specifies date and time values. Value = 4.
      Error Specifies errors. Value = 24.
      File Specifies files. Value = 18.
      GridChoice Specifies a Choice field for a data sheet. Value = 16.
      Guid Specifies GUIDs. Value = 14.
      Integer Specifies positive or negative integer values. Value = 1.
      Invalid Not used. Value = 0.
      Lookup Specifies references to values in other lists. Value = 7.
      MaxItems Specifies the maximum number of items. Value = 31.
      ModStat Specifies Content Approval status. Value = 23.
      MultiChoice Specifies multiple values per list item. Value = 15.
      Note Specifies a field that can contain multiple lines of text. Value = 3.
      Number Specifies floating point numbers. Value = 9.
      PageSeparator Inserts a page break in a survey list. Value = 26.
      Recurrence Specifies a field that is used in calendars for recurring events and abstract field type that, like computed fields, depends on other fields for its content and definition. Value = 21.
      Text Specifies a single line of text. Value = 2.
      ThreadIndex Specifies the ID that indicates the relative position of a message within a conversation thread. Value = 27.
      Threading Specifies a field that is used in the creation and display of threaded Web discussions. Value = 13.
      URL Specifies hyperlinks. Value = 11.
      User Specifies users of a SharePoint site. Value = 20.
      WorkflowEventType Specifies a workflow event type. Value = 30.
      WorkflowStatus Specifies workflow status. Value = 28.