All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Archive for February, 2008

Add central admin Site as a trusted site in IE

Posted by ken zheng on February 29, 2008

I have installed sharepoint a few times, But I can’t do anything in SharePoint 3.0 Central Administration. It can dispaly all pages, but when I try to update the site it just does’t work (Like create a new web site, add new document library)

And there is no any applicaiotn error in the event log

 Finally I found I need to add central admin Site as a trusted site in IE.

It works!!!!!

Posted in Sharepoint | Leave a Comment »

Visual Studio 2005 Service Pack 1 – Failed to install via Updates

Posted by ken zheng on February 27, 2008

If you failed to install VS 2005 Service Pack 1 via Updates, just download from to your local disk and then install

 http://www.microsoft.com/downloads/details.aspx?familyid=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&displaylang=en

Posted in .Net | Leave a Comment »

Sell your car free at CarsGuide

Posted by ken zheng on February 24, 2008

FREE Advantage Plus advert worth $30 @ CarsGuide (Selling your car!) 

 Discount: Free Advantage Plus ad Minimum Spend: $0.00

Promotional Code: AdvantagePlus

Expiry: Unspecified (Add an expiry date)

Instructions: Just add your car details and photos, select Advantage Plus as Ad. Enter promotion code then the amount is $0.00!

the price changed in front of my eyes:
was $30.00 NOW $0.00

with this code being for Advantage Plus listing I get:

Advantage Plus includes…
- Full feature list as per Red Book
- 4000 character comments
- Image display in the results page
- 8 images in the vehicles details section
- Add to each of your images up to 50 characters of free text
- Edit your ad at any time
- Your ad stays online until it is sold

PLUS
- Your ad will be a priority listing appearing above a standard ad
- Your ad will randomly appear within the first six search results

Posted in Uncategorized | 1 Comment »

Export and Backup Emails from Outlook to Gmail Online

Posted by ken zheng on February 24, 2008

Found a interesting blog show you how to Export and Backup Emails from Outlook to Gmail Online.

 See here

Posted in Tools | 1 Comment »

The remote server returned an error: (407) Proxy Authentication Required.

Posted by ken zheng on February 21, 2008

Today I just wrote code to use httpwebrequest get remote web pages, to avoid the error 407. you need to bypass the proxy server or firewall

Imports System

Imports System.Net

Imports System.Text

Imports System.IO

Public Class Test

‘ Specify the URL to receive the request.

Public Shared Sub Main(ByVal args() As String)

Dim request As HttpWebRequest = CType(WebRequest.Create(args(0)), HttpWebRequest)

Dim networkCredential As New NetworkCredential(“username”, “paswword”, “domain”)

‘ Set some reasonable limits on resources used by this request

request.MaximumAutomaticRedirections = 4

request.MaximumResponseHeadersLength = 4

‘ Set credentials to use for this request.

request.Credentials = networkCredential

Dim pry As System.Net.WebProxy = New System.Net.WebProxy(“proxyserver”, 8080)

‘The DefaultCredentials automically get username and password.

pry.Credentials = networkCredential

WebRequest.DefaultWebProxy = pry

Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)

Console.WriteLine(“Content length is {0}”, response.ContentLength)

Console.WriteLine(“Content type is {0}”, response.ContentType)

‘ Get the stream associated with the response.

Dim receiveStream As Stream = response.GetResponseStream()

‘ Pipes the stream to a higher level stream reader with the required encoding format.

Dim readStream As New StreamReader(receiveStream, Encoding.UTF8)

Console.WriteLine(“Response stream received.”)

Console.WriteLine(readStream.ReadToEnd())

response.Close()

readStream.Close()

End Sub ‘Main

End Class ‘Test

Posted in .Net | 14 Comments »

Backup and restore the sharepoint in command line

Posted by ken zheng on February 18, 2008

 Once you’ve sorted out the small matter of finding stsadm.exe in the first place, and installed all the shrapnel that goes in strange places such as the GAC, obscure subdirectories of Program Files, web.config, and so on, you do

stsadm -o backup -url http://mysite/ -filename backup-filename.bak

on server A. This produces a single file containing your site and all the subsites, and you simply copy it over to and do

stsadm -o restore -url http://myothersite/ -filename backup-filename.bak

on server B.

Yes, that’s right, that’s it.

No XML files to edit. No permissions to set. No convoluted database options to put in. No failed previous attempts to delete from all over the place.

Just the backup filename and the URL, and you’re done.

The only thing I found was that for some reason I needed to create an empty web application and a site collection first, and restore on top of that using the -overwrite option of stsadm.exe, but apart from that, it worked perfectly. So perfectly, in fact, that we had to triple check that it hadn’t missed anything out or come up with some other strange gotchas.

Come on Microsoft, if you can make the command line option that straightforward, how come the web based version is such a minefield?!

[Update: It turns out that there is one particular permission issue that you need to watch out for. When you are restoring a backup onto an already existing site collection, you need to make sure that you are running stsadm.exe as a site collection administrator. Apart from that, it’s quite straightforward.]

Posted in Sharepoint | Leave a Comment »

Upgrade the web front end or the content database to ensure that these versions match

Posted by ken zheng on February 18, 2008

After requesting an and applying Windows Sharepoint Services 3.0 hotfix 936867 our Sharepoint stopped working completely.

I’ve found the following error messages in the application log:

Event Type: Error

Event Source: Windows SharePoint Services 3

Event Category: Topology

Event ID: 5617

Date: 23.08.2007

Time: 17:57:34

User: N/A

Computer: WEB3

Description:

The schema version (3.0.149.0) of the database SharePoint_AdminContent_f80b1f17-ff1d-4df2-93d3-66bbbaf5790f on x64a is not consistent with the expected database schema version (3.0.150.0) on WEB3. Connections to this database from this server have been blocked to avoid data loss. Upgrade the web front end or the content database to ensure that these versions match

Option # 1

Start the Windows SharePoint Services Administration service using the Services applet (Start, Run, Services.msc) and run SharePoint Products and Technologies Configuration Wizard.
Option # 2

Start the SPAdmin service under the context of a local administrator on the server where the SPAdmin service failed to start when running the SharePoint Products and Technologies Configuration Wizard (psconfig.exe) and run SharePoint Products and Technologies Configuration Wizard.
net start spadmin
Option # 3

Download wssv3-kb934525-fullfile-x86-glb.exe from http://www.microsoft.com/downloads/details.aspx?familyid=76FC2225-2802-46E5-A294-A842E3841877&displaylang=en.
Extract wssv3-kb934525-fullfile-x86-glb.exe and run the installation by executing C:\temp\STS.msp (see below).

:\wssv3-kb934525-fullfile-x86-glb.exe /extract:c:\temp.
Option # 4

On the machine where psconfig failed to start the SPAdmin service run:
%commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\BIN\psconfig -cmd upgrade -inplace b2b -wait -force
Modify the service timeout values in the Registry:

HKLM\SYSTEM\CurrentControlSet\Control add/modify DWORD value ServicesPipeTimeout to 60000 (60 seconds)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control add/modify STRING value WaitToKillServiceTimeout to 120000 (120 seconds)
Restart the server machine.

UPDATE Oct. 23, 2007 14:52

A solution is available to administrators of SharePoint Products and Technologies deployments experiencing the following application event after introducing WSS October public update KB934525.

Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Topology
Event ID: 6800
Date: 10/17/2007
Time: 8:09:40 PM
User: NA
Computer: HOME
Description: The database WSS_Content on HOME\Microsoft##SSEE is not accessible to missing Windows Internal Database signatures.

1. Run the following STSADM operations to stop and start the SPWebService:

stsadm -o provisionservice -action stop -servicetype spwebservice -servicename “”

stsadm -o provisionservice -action start -servicetype spwebservice -servicename “”
2. Instantiate the upgrade by executing psconfig.exe or psconfigui.exe.

The cause of this issue is the SPWebService instance failed to finish provisioning. The status of that service is marked as provisioning. However, it has done enough provisioning work so that the user sites are working and/or during upgrade, the upgrade code skipped any web service instances that are not online, upgrading the administration sites; however, skipping the user sites.

A good artice about STSADM:http://www.microsoft.com/technet/technetmag/issues/2007/01/CommandPrompt/

Posted in Sharepoint | 1 Comment »

MOSS 2007 “File Not Found” error

Posted by ken zheng on February 18, 2008

In general, that the page was looking for a masterpage in a wrong place or master page is not existing in the Gallery

Don’t modify the web.config with the IIS tool, it
adds an attribute (xmlns) to the tag like so:
v2.0″>.

Posted in Sharepoint | Leave a Comment »

IntellSense for WSS development

Posted by ken zheng on February 15, 2008

Many aspects of the WSS development process involve the creation and maintenance of XML files. Editing an XML file without an intimate knowledge of the underlying schema file (XSD) is quite difficult. Doing so in an environment that supports IntelliSense and not having IntelliSense available to you while editing your XML files can be very disappointing. WSS v3 does in fact ship with an XSD file that you can attach to your environment. The following steps outline this process and we highly recommend that you walk through it before beginning any of the hands-on examples in this chapter.

  1. Open Windows Explorer and navigate to [Visual Studio 2005 Installation Directory]\Xml\Schemas.

  2. Create a new XML file, and insert the following snippet into it:

    <SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">  <Schema     href="file://C:/Program Files/Common Files/Microsoft Shared/web server extensions/12/TEMPLATE/XML/wss.xsd"    targetNamespace="http://schemas.microsoft.com/sharepoint/"/> </SchemaCatalog>
  3. Save the file and give it a meaningful name, such as wsscatalog.xml.

  4. Open Visual Studio 2005 and create a new XML file.

  5. Create a WSS v3 XML file root node such as <Feature>, add the xmlns attribute and choose the SharePoint namespace from the list provided to you by IntelliSense.

From this point forward, you will have IntelliSense available to you as you edit this file for all elements and attributes. This will certainly make your life much easier as you begin to create, edit, and maintain all of the different types of XML files you will encounter during your WSS v3 development experiences.

In addition, all references to the SDK are referring to the Windows SharePoint Services 3.0 SDK located at the following URL (http://msdn2.microsoft.com/en-us/sharepoint/default.aspx).

Posted in Sharepoint | Leave a Comment »

Content Types

Posted by ken zheng on February 14, 2008

What are Content Types?

For me, one of the coolest new features of SharePoint Server 2007 (or MOSS) is Content Types. In this article, I’ll aim to give a brief overview of what they are and why you should be getting excited about them (especially if you are from a SharePoint 2003 background).It is worth noting that this article is focused on the implications of Content Types in a document management scenario. Content Types are used throughout MOSS and have benefits throughout, but it was too much to cover in one article, so I decided to focus on DM.What is a Content Type then?
A content type is an object that is stored within MOSS that defines several elements of a piece of content, including:

  • Document Template that the content will be based on
  • Columns that the content will have associated with it (metadata)
  • Workflows that the content will use
  • Information Management policies that apply to the content
  • Conversion types for the content

You can view the entire list of site content types by following these steps:

  1. Navigate to the site collections main page.

  2. From a publishing page, click Site Actions, then Site Settings, and then Modify Site Settings, or from a standard page select Site Actions, then Site Settings.

  3. Under the Galleries section, select Site content types, which lists all of the content types in the site collection.

Creating Content Types

Many times companies will have their own definition of what describes data. In that case, you will want to create your own content types that can be part of the site collection. To create your own content type, use the following steps:

  1. Click on the Site Settings page

  2. Then under Galleries, click on the link that takes you to Site content types. Here, you will find all of the content types that you can use on the current site and its subsites.

  3. Click on the button available at the top left labeled Create to create a new content type.

  4. Enter a meaningful name and description, then select the parent type of List Content Types and the parent content type Item.

  5. Keep the group as Custom Content Type, and press OK.

 

Add Content Type

   1. Select List or Documents

   2. Click Settings -> Document Library Settings -> Advanced settings under General Settings section

   3. Tick ‘Yes’ to “Allow management of content types?

   4. Click OK then you will have below section to select content type

 

What does this mean for users?
This means that users can now create an expense report by simply choosing ‘expense report’ from the new item button on the library. Their new expense report will be created from the central content type with the document template and all the columns and workflow that are associated with the content type.

This pictures show the net result of content types; the ability for users to choose what type of content they wish to create

The important thing to note here is that the content will inherit all of the columns and workflow that comes with the content type – even if the library does not.

For example, if you have a standard document library that just has the ‘blank document’ content type associated with it (which is the default) it will not have any columns or workflows. However if you add the ‘expense report’ content type to the library, items created from that content type will have all of the columns and workflows that are required by the content type. These columns can be used in the same way as list-based columns.

Posted in Sharepoint | 3 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers