Microsoft Technology, .Net, BizTalk, Sharepoint & etc.

Liedong(Ken) Zheng, Senior SharePoint Developer at SIMPLOT

Archive for March, 2008

Steps to add Site Column to Crawled Property to Managed Property

Posted by ken zheng on March 14, 2008

When a site column is first created, you can do all the search crawling you want.  Full, incremental, doesn’t matter.  It won’t show up as a Crawled Property until it’s actually used and there’s data associated with it.  Once it has data that’s using it, a simple incremental crawl will pick it up and add it to the Crawled Property listing.

Now that it’s a Crawled Property we can create a Managed Property that maps to it, i.e. create a Metadata property mapping.  One thing worth noting when the mapping is created.  When you look to select the crawled property to map to the managed property, you’ll see at least two properties with the name of your site column.  You’ll want to select the one that begins with “ows_”.  After creating the mapping, the Managed Property will be available for you to use, with a caveat.

Caveat:  There won’t be any data stored in the search index associated with this new property right away.  Content that is associated with property mappings is grabbed by the crawl on a document by document basis.  So over time, incremental crawls will eventually get all the content, but the only way to ensure all content is picked up by the new mapping is to do a full crawl.

Posted in Sharepoint | 1 Comment »

Visual Studio 2008

Posted by ken zheng on March 13, 2008

Posted in VS2008 | Leave a Comment »

Log details for sharepoint 2007

Posted by ken zheng on March 12, 2008

 To learn to work with BDC (anod other MOSS stuff) you really have to first know to configure diagnostic logging; without this you are left with very little information to figure out what’s wrong.

Goto ‘Central Administration’ -> ‘Operations’ -> ‘Diagnostic Logging’ -> ‘Event Throttling’ and turn on the objects that you want to monitor. In this case, you may want to turn on ‘Business Data’, select ‘None’ and ‘Verbose’. You can also customize your log path so that it is not as long as the default value.

 Then open the log file from “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS”

Posted in Sharepoint | 1 Comment »

how to install AdventureWorks SQL Server 2000 Sample

Posted by ken zheng on March 11, 2008

You have to attach the database. Read the complete instructions here:

http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=SQLServerDatabasesandSamplesOverview&referringTitle=Home

Copy/paste from the article here (run this code in a query in SSMS):
exec sp_attach_db @dbname = N’AdventureWorks’,
@filename1 = N’C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf’,
@filename2 = N’C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf’

Posted in SQL | Leave a Comment »

Installation Guide for SharePoint Application Templates

Posted by ken zheng on March 7, 2008

First download tempaltes from microsoft, run the exe and extract data to your local disk (I used c:\templates).

Application Template Core Installation Walkthrough 

 Before installing any Application Template, you must first install the Application Template Core (download link below) solution.

  • Launch the command prompt and run: cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
  • then run: stsadm -o addsolution -filename c:\templates\applicationtemplatecore.wsp
  • run: stsadm -o deploysolution -name applicationtemplatecore.wsp -allowgacdeployment -immediate
  • last run: stsadm -o copyappbincontent

Application Template Install Walkthrough

Copy the folllwing cod to a bat file, then run the bat file which can help you install all the tempaltes

@echo off
CD C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
c:

stsadm -o addsolution -filename c:\templates\AbsenceVacationSchedule.wsp
stsadm -o deploysolution -name AbsenceVacationSchedule.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\BudgetingTrackingMultipleProjects.wsp
stsadm -o deploysolution -name BudgetingTrackingMultipleProjects.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\BugDatabase.wsp
stsadm -o deploysolution -name BugDatabase.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\CallCenter.wsp
stsadm -o deploysolution -name CallCenter.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ChangeRequest.wsp
stsadm -o deploysolution -name ChangeRequest.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ComplianceProcessSupport.wsp
stsadm -o deploysolution -name ComplianceProcessSupport.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ContactsManagement.wsp
stsadm -o deploysolution -name ContactsManagement.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\EventPlanning.wsp
stsadm -o deploysolution -name EventPlanning.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ExpenseReimbursementApproval.wsp
stsadm -o deploysolution -name ExpenseReimbursementApproval.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\HelpDesk.wsp
stsadm -o deploysolution -name HelpDesk.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\InventoryTracking.wsp
stsadm -o deploysolution -name InventoryTracking.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ITTeamWorkspace.wsp
stsadm -o deploysolution -name ITTeamWorkspace.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\LendingLibrary.wsp
stsadm -o deploysolution -name LendingLibrary.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\PhysicalAssetTracking.wsp
stsadm -o deploysolution -name PhysicalAssetTracking.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ProjectTrackingWorkspace.wsp
stsadm -o deploysolution -name ProjectTrackingWorkspace.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\RoomEquipmentReservations.wsp
stsadm -o deploysolution -name RoomEquipmentReservations.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\SalesLeadPipeline.wsp
stsadm -o deploysolution -name SalesLeadPipeline.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\ApplicationTemplateCore.wsp
stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate
stsadm -o addsolution -filename c:\templates\KnowledgeBase.wsp
stsadm -o deploysolution -name KnowledgeBase.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\JobRequisition.wsp
stsadm -o deploysolution -name JobRequisition.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\DocumentLibraryReview.wsp
stsadm -o deploysolution -name DocumentLibraryReview.wsp -allowgacdeployment -immediate

stsadm -o addsolution -filename c:\templates\PrivateFieldPackage.wsp
stsadm -o deploysolution -name PrivateFieldPackage.wsp -allowgacdeployment -immediate

 Once you have deployed all application templates you would like, restart IIS
iisreset

How To Implement Application Templates

  1. From the Site Actions drop-down menu in the top right, select Site Settings.
  2. Under the Site Administration section, select Sites and Workspaces.
  3. Select the Create button to create a new site using a site template.
  4. Fill in all appropriate information for the new site and in the Template Selection section, select the Application Templates tab, select the template to use for this site and click Create.

That should do the trick. A new site has been created. Now go ahead and play around with it.

Application Template Uninstall Walkthrough

This installation was simple. The uninstallation is just as straight forward.

  1. First and foremost you need to retract a solution (not allow SharePoint sites from using it)

    stsadm –o retractsolution –name ApplicationTemplateCore

  2. To remove a solution from the server

    stsadm –o deletesolution –name ApplicationTemplateCore

  3. The Application Template is now unavailable to SharePoint sites and the solution has been removed from the solution store.

Posted in Uncategorized | 11 Comments »

Site Template

Posted by ken zheng on March 6, 2008

Posted in Sharepoint | Leave a Comment »

screen capture tool

Posted by ken zheng on March 5, 2008

MWSnap is a small yet powerful program for taking scren captures of a desktop, an active window,menu, or a specified part of the screen. The program supports BMP, JPG, TIFF,PNG and GIF formats, with user selected color depth and quality settings. It also includes a zooming tool, a screen ruler and a color picker as well as system wide hotkeys and preset selection sizes. A very nice program, one of the best – if not the best, you can currently find for free.

http://www.snapfiles.com/download/dlmwsnap.html

Posted in Tools | Leave a Comment »

5 GB online storgae

Posted by ken zheng on March 5, 2008

You can enjoy 5GB storage space with MS. Register here – http://skydrive.live.com/home.aspx

Posted in Uncategorized | Leave a Comment »

Request for the permission of type ‘System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed

Posted by ken zheng on March 3, 2008

I got this error when I run the console application which register GAC dll to sharepoint site. 

  I check radio button ‘This is a full trust application’. Then I tried to run the application. And its running very fine. Your security tab should look like the following:

Posted in .Net | 1 Comment »