戰地連結︰ Home My Flickr NBA.com About

2008年4月29日星期二

Publish Browser Enabled InfoPath Form to MOSS 2007

今日開始玩InfoPath, 想publish一張 InfoPath 既 form 入 SharePoint Server 做 WebPart, 但係0向 publish 既時候就見到呢個warning...

"This form template is browser-compatible, but it cannot be
browser-enabled on the selected site
"

結果搞左一大輪先搞得掂... 方法請參考下面既link

Reference:

A checklist for enabling browser forms with Forms Services and SharePoint 2007

KeyPoint:

其實我跟足 Reference 既方法都唔得, 原因大概係因為0向 SharePoint 做 setting 既時候 server未可以成功改到setting. 咁就可以根據以下keypoint試試︰

  1. 做完第 1, 2 步之後, 可以 restart 一次 IIS 先再做 step 3.
  2. 如果去到 "Site collection features" 搵唔到 "InfoPath Forms Services support", 就去 "Office SharePoint Server Enterprise Site Collection features"
  3. 如果所有步驟都無效, 就做以下動作, 手動 restart 個 feature︰
    3.1   去 SharePoint Server, 入 command prompt, 去 folder: "Program Files\Common
            Files\Microsoft Shared\web server extensions\12\BIN"

    3.2   輸入 "stsadm -o deactivatefeature -filename IPFSSiteFeatures\feature.xml -force -url
            http://YourMOSSurl"
    3.3   Operation Success 後, 再輸入 "stsadm -o activatefeature -filename
            IPFSSiteFeatures\feature.xml -force -url
    http://YourMOSSurl"

Steps to Install SharePoint Server 2007 (Standalone)

Reference:

  How to Build a SharePoint Development Machine

Deployment Environment:

  Hardware: Virtual PC 1GB Ram
  OS: Windows Server 2003 R2 SP2

Steps:

  1. Install .Net framework 3.0
  2. Install and Setup Internet Information Server (IIS)
        2.1    Install IIS
        2.2    Add "Application server" role in "Configure Your Server Wizard (Administrative Tools
                 => Configure Your Server Wizard)
        2.3    In "IIS Manager" => "Web Sites" folder => "Web Sites Properties" => "Service"
                => "Isolation mode", clear the "Run WWW services in IIS 5.0 isolation mode" check box
  3. Enable ASP.NET 2.0
        3.1    In "IIS Manager" => "Web Service Extensions" folder, Allow "ASP.NET v2.0.50727"
  4. Install SQL Server 2005
  5. Install SharePoint Server 2007
        5.1    Start Setup, enter Product Key
        5.2    Press "Next" until ask to "Choose the installation you want", select "Bacis"
        5.3    When finished, make sure that "Run the SharePoint Products and Technologies
                 Configuration Wizard now" check box is selected
  6. Run "Products and Technologies Configuration Wizard"
  7. Add the SharePoint site to the list of trusted site
  8. Configure proxy server settings to bypass proxy for local address (For Internet Explore Only)
        8.1    In IE "Tools" => "Internet Options" => "Connections" => "LAN settings", select "Bypass
                 proxy server for local address"
  9. Done! Type the IP address of your server in IE to see the result.

Setup remote connection in SQL Server 2005

Overview:

SQL Server 2005 default 是不可以做 remote connection 的 (有點難以理解...), 而要設定SQL Server 為可以remote connection 也不是這麼容易的事. 經過一返Google以及試驗後, 終於成功以 SQL Server Authentication login 入 remote 既 DataBase.

Reference:

Enable remote connection to SQL Server 2005 Express

這個link講的是 2005 Express, 不過其實都是大同小異

Steps:

  1. Enable SQL Server Authentication, 開一個 SQL Server Authentication Login Account (請參照上一個post)
  2. 去 "All Programs" => "SQL Server 2005" => "Configuration Tools" => "SQL Server Surface Area Configuration"
  3. 揀 "Surface Area Configuration for Services and Connections"
  4. Expand "Server name" => "Database Engine" => "Remote Connections"
  5. 揀 "Local and remote connections", 揀埋 "Using both TCP/IP and named pipes"
  6. 0向左面 "SQL Server Browser", Expand 開揀 "Services", "Start type" 揀 Automatic, apply then start service.
  7. 其實以上步驟已經configure好remote connection, 不過有可能SQL Server 無 enable到 named pipes 同 TCP/IP. 咁就要跟以下步驟黎enable 返
  8. 去 "All Programs" => "SQL Server 2005" => "Configuration Tools" => "SQL Server Configuration Manager"
  9. Expand "SQL Server 2005 Network Configuration", 揀 "Protocols for xxxxx", xxxxx 係你 Server Instance 個名
  10. 0向右邊enable 返Named Pipes 同埋 TCP/IP, 跟住 restart service

2008年4月28日星期一

如何新增 "SQL Authentication Login" in SQL Server 2005

Reference:
Windows Authentication vs. SQL Server Authentication


有沒有試過設定了新的SQL login account卻不能用它connect 到 SQL server的經驗呢?

原來SQL server 2005 有一個 "authentication mode" 的 setting, 而default是 "Windows Authentication mode", 即是只接受windows authentication, SQL authentication 是不行的.


要更改這個setting, 需要login 到 "SQL server Management Studio", 在 object explorer 中right click server 名字, 選 "properties" => "security", 就會見到可以選擇 "SQL Server and Windows Authentication mode" 啦~


如果要新增一個 SQL Authentication Login Account, 則在上面提到的 "properties" => "security" 再選 "Logins", 在右邉 "summary" 空白地方 right-click "New Login..." 就可以了, 記得選 "SQL Server Authentication"...


提多一點, 這裡create出來的account是沒有權限的, 連table也看不到, 要在各database處再添加permission給這個account才可以工作 (例如︰最簡單的觀看 table 內容就只要 "connect" 以及 "select" permission 就ok 了)