Friday, October 30, 2009

The site collection could not be restored!!!

I have been doing base line of my application in my VM.I have two site collection in my web application. Each has its own database…
I got the following error while doing restore site collection.

Delete the corresponding DB ,next recreate new DB for your site collection and try to restore again.
It should work

Thursday, October 22, 2009

Creating Custom Page Layouts notes?

Overview of Page Layouts?
Combined with master page to define the rendering of a content page
􀂃 Obtains master page from SPWeb.CustomMasterUrl
• Hosts field controls and Web Part zones
• Complies to the Page Layout content type
• Has an associated content type
􀂃 Dictates which content type the page layout is used for rendering
• Can bind multiple page layouts to content type
• Associated with exactly one content type
Page layouts live within the Master Page Gallery
􀂃 http://servername/_catalogs/masterpage
􀂃 Exists only in the top-level site within a site collection
• Upon site provisioning, page layout added to Master Page Gallery as GhostableInLibrary
􀂃 While living in the Master Page Gallery as uncustomized the page layout on the file system is used
Site Columns & Content Types In Publishing Sites
Site columns & content types play a key role in Publishing sites
• Both are used to define schema for content pages
• Content types must inherit from the Page content type (which inherits from System Page)
􀂃 Go to the following location for basic information
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingResources\PublishingContentTypes.xml
􀂃 The article page layout with the following content type

• Page layouts must be associated with content types
Why site Column?
Reusable column template for use within lists and content types
• Specify:
􀂃 Name & description
􀂃 Data type
􀂃 Site column group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list / content type creates a copy.
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
• Features & object model provide most control
􀂃 Easy to version in virtually all source control systems
􀂃 Highest level of reuse
Creating Site Columns with Features

Wt is the Content Types?
Enable storage of different types of content in
same list or library
• Specify:
􀂃 Name & description
􀂃 Site columns, workflows, event receivers, policies, etc.
􀂃 Content type group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list creates a copy
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
Creating Content Types with Features

Activate our feature..

After activation site columns and content types would appear like the below.

How to create a page layout using SPD2007?

Now you need to add some structure to this page. Cheat a bit by copying the contents of the ArticleLeft.aspx page layout and paste them into CusomPageLayout.aspx.
Drag and drop our site columns in a structured maner.Here I just drag n droping….

Wt are the difference b/w Field controls and WebParts?

I will try to explain how to deploy page layout through studio in future posts.
Thanks my WCM guru and Ian for giving support.

Wednesday, October 21, 2009

Error: The path specified cannot be used at this time. (Exception from HRESULT: 0x80070094)

While creating a web application on MOSS2007 environment i have been getting this error.
I didn't find out any errors related to this in Logs file.
Finally i did two steps
1)Restart the SharePoint Timer Services
Still i am getting this error...
Finally restart the server...
I know the last one is actually ridiculous but it helped.(My box RAM is 1GB,2 users are using this through remotely and N/W IP is slow and etc)
Trust me it should work!!

Wednesday, October 7, 2009

How to get value from resource file and set into a control in a ASPX page?

I have been struggling from past 2 days to fix this issue.
Luckly I got information from
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\ADMIN\CMSIncrementalMigration.aspx at 64 line.

It should work.Tx WSS Team...