At some point when we were adding a new site under "Sites" by selecting the "create site in the left column, we were not able to select the folder "sites" anymore. Only "personal" was visible. After some investigation i found the cause.
SharePoint works with so called "managed paths". These paths define which paths are excluded (if you need to access a physical path on disk) and which paths are included (paths managed by Windows SharePoint Services).
You can reach this by going into SharePoint Central Administration, Windows SharePoint Services. Select "Extend or upgrade virtual server" and select the website from "complete list". Under "Virtual Server Management" there is an option called "Define managed paths".

Check if the "sites" and "personal" both are defined under "included paths". Now goto "site settings" of your website. select the option "Manage personal sites" under "User Profile, Audience, and Personal Sites".

Check if "personal" is selected at "Personal Site Location". In my case "sites" was selected which caused "sites" missing. The managed path selected here will NOT appear at the create site page. Now goto the website again and select the the page "Sites". Choose "Create site" under "Actions" and there it is again. Your "sites" folder appears again.
I'm already working some time with MOSS 2007 (Microsoft Office SharePoint Server) and have installed the beta 1 and beta 2 versions of the product. Last week i had to reinstall MOSS for some reason and got into problems.
Every time when you try to run the configuration wizard i got the following error:
Failed to create the configuration database. Reason: The language is not supported on the server.
After googling and thanks to a few guys there i found the solution. You have to make some registry changes before running the configuration wizard again. If you have choosen the "advanced" installation containing farms you have to remove two databases from SQL Server 2005.
The fix is:
- Start regedit.exe at your Windows 2003 Server
- lookup the the key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\ServerLanguage] en put there a string value "1033"=""
You could also put the following into a fix.reg file using notepad:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\ServerLanguage] "1033"=""
Thanks to Kevin Tunis :)
One of our customers uses document libraries in SPS2001 containing a minus sign in their path. They are going to migrate their environment to SPS2003 and have setup a test environment.
When they created a document library containg a minus sign in its name, its url was created without the minus sign. It was replaced with nothing. For example: The name "new-documents" will generate a document library with the name "new-documents" and the url "http://somedomain/newdocuments" in stead of "http://somedomain/new-documents".
It seems that in SPS2003 the use of a minus sign is not possible anymore. Even if you edit the document library it will not accept the use of a minus sign in the url.
In this case we found a solution. After creating the document library we made some changes in the database. I know that Microsoft does not support changing the database but in this case we had no other solution.
If you go to the table "Docs" and look at the field "DirName" you will find some rows containing the paths to the files: Forms, allitems.aspx, dispform.aspx, editform.aspx, template.aspx, upload.aspx and webfldr.aspx. Change the names by entering the minus sign at the correct solution.
Finally there is in the column "LeafName" one recor containing the name "newdocuments" and the column "DirName" is empty. Also this one has to be changed to "new-documents".
No try it by entering the correct (with minus sign) url in your webbrowser. It works! :)
Today i'm giving a presentation for a group of students about a project using SharePoint. In my case its a project built in Windows SharePoint Services (WSS).
Last week i was at the customers location and did a backup of the WSS site. Today i tried to set it up in my Virtual PC environment, and with success! :)
There are still some issues which are not handled by the backup / restore functionality of stsadm command.
Just for your information some of these issues:
- It is only possible to restore the WSS site when the same or higher service pack is installed
- If you're using Custom WebParts. You have to copy them into your bin folder or install them into the GAC.
- Also do not forget to place the <SafeControl> entry in the web.config file
- If you're using SessionState do not forget to turn it on in the web.config file
- I always advise to create per site your own layouts and images folder. Change the paths of the virtual directories in IIS
I used the following command line to restore the database:
stsadm -o -restore -url http://somsite -filename d:\pub\somesite.bkp -overwrite
I always like these kind of postings. Proofing that some things are possible :) In his example he adds a WebPart Page to a Document Library by altering some code in the well-known ONET.XML. Do not be afraid of editing this file. Its quite easy to understand whats going on.
Check your documentation "Microsoft SharePoint Products and Technologies 2003 Software Development Kit" (file spptsdk.chm) and look for ONET.XML. You will find an article describing each bit of this file.
The article describing pre-populating a document library can be found at:
http://blogs.msdn.com/cjwalker/archive/2005/10/26/484879.aspx
Thanks to Christopher Walker!
I found a nice topic in the SharePoint documentation which explains the properties that can be set on the command line using the stsadmin.exe tool with the getproperty and setproperty operations. This is as follow:
stsadm.exe -o getproperty -pn <property name> [-url <url>] stsadm.exe -o setproperty -pn <property name> -pv <property value> [-url <url>]
As stated in the "Microsoft Office SharePoint Portal Server 2003 Administrator's Guide" (file SharepointPSAdmin.chm):
"Some properties are available for the entire server, and are called server properties. Some are only available for an individual virtual server. When you get or set a server property, you can omit the url parameter. You must include the url parameter to get or set virtual server properties. For more information about setting properties, see "Introducing the Administration Tools for Windows SharePoint Services" in the Windows SharePoint Services Administrator's Guide."
The properties are divided in several categories:
Server Properties for Windows SharePoint Services
- Antivirus properties
- Data retrieval services properties
- HTML Viewer properties
- Site confirmation and automatic deletion properties
- Usage analysis properties
Virtual Server Properties for Windows SharePoint Services
- Alert properties
- Content database properties
- Data retrieval services properties
- General properties
- Site confirmation and automatic deletion properties
Lookup "Command-Line Properties" in the mentioned file for the complete list and explaination of each property divided over the categories.
But it would be nice if you can access these properties programmatically. This is possible with the following code:
Microsoft.SharePoint.Administration.SPGlobalAdmin globAdmin = new Microsoft.SharePoint.Administration.SPGlobalAdmin(); Microsoft.SharePoint.Administration.SPGlobalConfig globConfig = globAdmin.Config;
SPPropertyBag propBag = globConfig.Properties; System.Collections.ICollection keys = propBag.Keys;
foreach (object key in keys) { output.Write(SPEncode.HtmlEncode(key.ToString()) + " :: " + SPEncode.HtmlEncode(propBag[key.ToString()]) + "<BR>"); }
I got a lot of questions of colleages regarding custom templates and site definitions.
As stated in the help: "A custom template is a customization applied to a site definition. When a user customizes a site or list in the user interface, the custom template consists of the difference between the original state of the site or list as determined by its definition and the state of the site when the custom template is generated. Custom templates remain tied to a particular site definition (for example, the one for a SharePoint site or a Meeting Workspace site), so that if the site definition is not present or is changed, the custom template will not work."
In many cases building Portals with SharePoint Portal Server you want to change the defined Site definitions. These Site definitions are the templates you can choose from when you create a new site.
The problem with changing a Site definition is that when somebody else in another Portal creates a site with the same template, he is also getting your changes. So the following sequence of steps can be taken to create your own Site definition.
The first thing you have todo is copy an existing Site definition and rename it. Existing site definitions are found in the folder <localdrive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\<localeid>. For example copy the STS folder and rename it to MYSTS.
In this folder you will find an XML folder containing the file ONET.XML. This is the schema file containing Collaborative Application Markup Language (CAML). If you want to make changes to the listings, WebParts and other stuff showing up when creating a site, this is file to make the changes in.
The next step is telling SharePoint that there is a new template defined. Under the folder <localdrive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\<localid>\XML you will find a schema file called WEBTEMP.XML. Copy this file and call it WEBTEMPMY.XML. It is very important that the name of the file starts with WEBTEMP.
Your WEBTEMPMY.XML will look like this:
<?xml version="1.0" encoding="utf-8" ?> <!-- _lcid="1033" _version="11.0" _dal="1" --> <!-- _LocalBinding --> <Templates xmlns:ows="Microsoft SharePoint"> <Template Name="MYSTS" ID="10200"> <Configuration ID="0" Hidden="False" Title="<some title>" Type="0" ImageUrl="<someimage>" Description="<somedescription>"> </Configuration> </Template> </Templates>
The following things are very important:
- Make sure that the Name property of the Template element is the same as the name of your folder.
- The ID property of the Template element should be in the range of 10000 or higher. Make sure its not used anywhere else.
- The ID property of the Configuration element points to a configuration with the same id in the ONET.XML.
- Property Hidden determines if the template should appear in the list when creating sites. It could be that you create your own sites based on the Site definition in a custom WebPart and users are not able to use your Site definition.
The final step is resetting the IIS by calling iisreset. It also works when recycling the application pool used by your Portal.
Further information regarding this subject can be found in the article "Creating a Site Definition from an Existing Site Definition" in Microsoft SharePoint Products and Technologies 2003 Software Development Kit.
And finally a good article which goes further into this by Robert Bogue: http://www.devx.com/dotnet/Article/27673/0
Did you ever wonder where those sites went if you create one under the Sites directory within SharePoint Portal Server? I did! If you try to list a sites by using the SPSite.AllWebs they will not show up. Why? So far as I can see they are created as "floating" sites. But there is a way to list them. The Sites directory is a Area and can be found easily.
First create a TopologyManager and retrieve the PortalSite object by using an Uri object.
TopologyManager topologyManager = new TopologyManager(); Uri uri = new Uri("http://localhost/");
PortalSiteCollection sites = topologyManager.PortalSites;
PortalSite portalSite = sites[uri];
Then get the PortalContext and use this to get the Guid of the SystemArea. The SystemArea is an enumeration providing you some starting points of Areas.
PortalContext portalContext = PortalApplication.GetContext(portalSite);
Guid homeGuid = AreaManager.GetSystemAreaGuid(portalContext, SystemArea.Home);
Based on the Guid its very easy to retrieve the actual Area object. And based on that Area object we retrieve the Sites Area object from its children.
Area homeArea = AreaManager.GetArea(portalContext, homeGuid); Area sitesArea = homeArea.Areas["Sites"];
Loop through the AreaListings in this Area object and check if its type is ListingType.Site. The URL property contains the url to the created sites.
foreach(AreaListing listing in sitesArea.Listings) { if (listing.Type == ListingType.Site) { output.WriteLine(String.Format("{0} ({1})<br>", listing.Title, listing.URL)); } }
I'm doing some research about areas in SPS 2003. During my research i found a control called BreadCrumbTrail in the namespace Microsoft.SharePoint.Portal.WebControls which indicates were the current area is in the portal structure. Some googling brought me to the blog of Manuel Montes. He gives us an example of how to use the control. Thanks Manuel! :)
See below:
- Open any of the default.aspx pages for an area template in your favourite editor. For example, the SPSTOPIC\default.aspx page.
- Locate the following code that renders the page title:
<tr> <td ID="onetidPageTitle" class="ms-pagetitle"> <SPSWC:CategoryProperty runat="server" Property="Name" /> </td> </tr>
- Comment this entry
- Replace the code with the following:
<tr><td><spswc:breadcrumbtrail id="BreadCrumbTrail2" runat="server" titlelocid="MultiPage_BreadcrumbWebPartTitle" verticalmode="false" frametype="None"></td></tr>
Note that you will need to give the control a unique ID ("BreadCrumbTrail2") ast here is another control already on the page.
- Save the Page and take a look… You should see something like this in place of the Page Title.
Back to: Home > Topics > Applications
Changing the appearances can be done changing the following styles:
.bc-cell .bc-htable .bc-trail .bc-leadin .ms-vb bc-cell
http://pasteldelimon.blogspot.com/2005/06/breadcrumb-links-for-sps-areas.html
For one of our customers we build a Portal used as a Company Management System. It is a management system for internal documents needed at several indoor as outdoor locations. This Portal is a very good example of creating a design for customers. Together with a designer it only took 5 days manhour to accomplish this. It involves changing styles, adding new styles and adding new images. Some changes in custom WebParts was needed.

Thanks to Dustin an overview of the features found in SharePoint v3.
UI / UX
- WSS will have an entirely new user interface that includes better navigation controls and built-in breadcrumb trails.
- Pages will derive from “master pages“, meaning that you could re-skin an entire SharePoint site by modifying just one template file
- More professional out of the box themes
- FrontPage can directly edit each site's CSS file(s)
- Workflow built-in all over SharePoint, with tight integration with Outlook 12 tasks
- Individual documents can have document-specific workflows
- Item-level security on lists and libraries
- FrontPage has evolved further into a SharePoint designer tool (I read that as: the only SharePoint designer tool), and apparently, ghosted/unghosted pages won't be a problem any longer
- Recycle bin with user and administrator restore features for document libraries and list items
- InfoPath forms can be filled out with only a browser when published as (to?) a SharePoint site (even with FireFox)
- Customizable and extensible search (and search API), including “did you mean“-type search term corrections
- Lists can be viewed on mobile devices
Integration
- All lists and libraries have RSS feeds, and each list's feed can be customized to include whatever fields you'd like
- Event list RSS feeds include iCal files as enclosures
- Each site has a master “aggregating“ RSS feed
- Outlook 12 can perform 2-way online/offline syncronization of the following list types:
- Contacts
- Events
- Tasks
- Discussion Lists
- Document Libraries (!)
- Discussion lists can create their own e-mail alias in Active Directory, allowing you to e-mail that alias to automatically archive that e-mail (and its attachments) to a SharePoint discussion list
- ALL lists and libraries have version history capability, and only “diffs“ are stored (differences from one change to the next)
- Access treats SharePoint sites as honest-to-goodness data sources
Developer-oriented news
- Existing web parts will “just work“ in the new SharePoint web part page framework
- Site definitions/templates will ship in the box for blogs and wikis (blogs can be built directly on your “My Site“!)
- All lists and libraries will have synchronous event handlers (not sure how these work with other interfaces to SharePoint data, like OM, WEBDAV, SOAP, etc., if the event handler has to raise an exception)
- List/library version history is exposed programmatically by way of the OM
- Multiple “content types” (sets of metadata, or “metadata templates“, if you will) for document libraries and lists, that include view information, workflows, bound events.
- FrontPage can edit workflows
- Business Data Catalog (datasource catalog on steroids, apparently). This doesn't seem all that new to me, so I'll reserve commentary until more details emerge after the expected PDC sessions)
A good friend of mine, Pedro Serrano of CaveDigital, just started recently his own blog. Just have a look. His company specialises also in SharePoint and he has some nifty, cool things built.
I get a lot of questions of starting SharePoint developers that when setting up their development area and try to test their newly created WebParts they often get the error message "Not registered as safe on this website...".
This message can mean anything because it is a standard message from SharePoint. But in most cases the following will work. So here a simple but handy walkthrough when you are developing WebParts.
- Set your debug output folder of your WebPart Library development to the bin folder of your Portal
- Make sure that there is a <SafeControl .... /> tag placed in the web.config
- Use a tool like InstallAssemblies to generate your dwp files and add them to your Portal
- Set the trust level to "Full" in the web.config
Important!! Keep in mind that taking these steps will give you full control of all API stuff in SharePoint. But a lot of it is under CAS (Code Access Security) which means that if you do not have sufficient rights the method or property will throw an exception.
So always test your WebParts in a test environment when they are for example signed and try to access it with a SharePoint user not having the same role as the Administrator does. (in most cases when you are developing you have Administrator rights)
Have you ever wondering who designed the look and feel of SharePoint? I have... sometimes i wonder why they did the look of SharePoint as it is today. One of the things i really don't like is that when you create a new site with a name and description the following look and feel is presented:

As you can see the description is below the line, means it takes up space of a table row where WebParts are normally displayed. The "Home" text has a ridiculous size in comparison with the title i just entered. So after some changes to the default.aspx file you get the following:

This is more like it :) So how did i do this? It is very easy. Just open the default.aspx file in an editor (or use Frontpage if you want), and look for the following:
<SharePoint:ProjectProperty Property="Description" runat="server"/>
This part will produce the description of the site. We are gonna move it to the position of the "Home" text. The home text can be found under the section <!-- Title -->. Just replace it and remove the description from its original place (don't forget to through away the <tr><td>....</td></tr>)
Now look for the following:
<SharePoint:ProjectProperty Property="Title" runat="server"/>
You will see that this is found in the same section <!-- Title --> just before the "Home"text. Notice the styles used in the <td> ... </td> elements for both parts.
The property title uses the style ms-titlearea, and the moved property description is using the ms-pagetitle. Now swap both styles.
This is everything we have todo. :)
When you add one or more new templates to your SharePoint environment you normally have to call iisreset.exe to let SharePoint recognize the new templates. On a development machine its not so bad to do this, but on a live environment it also shuts down other sites and Portals. You could also do the following:
Make sure that your Portal has its own Application Pool and recycle the pool will have the same effect. Your new templates are now recognized.
In some cases you need to nest a CDATA inside another CDATA like when you use a ContentEditorWebPart in the ONET.XML by creating a template definition. A CDATA is used to let the parser skip the information found between the brackets in case you don't want that part to be parsed.
For example:
<AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1"> <![CDATA[ <WebPart xmlns:xsd="" xmlns:xsi="" xmlns=""> <Title>Title</Title> <Assembly>Microsoft.SharePoint, ...</Assembly> <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName> <ContentLink xmlns="" /> <Content xmlns=""> <html><b>Hello there</b></html> </Content> </WebPart> ]]> </AllUsersWebPart>
This example will fail because it tries to parse the html inside the <Content> tag. So you could do the following:
<AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1"> <![CDATA[ <WebPart xmlns:xsd="" xmlns:xsi="" xmlns=""> <Title>Title</Title> <Assembly>Microsoft.SharePoint, ...</Assembly> <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName> <ContentLink xmlns="" /> <Content xmlns=""> <!CDATA[ <html><b>Hello there</b></html> ]]> </Content> </WebPart> ]]> </AllUsersWebPart>
Also this is not gonna work. The parser actually thinks that the part it should not parse stops at the first ]]> found. The solution is relative simple but in some cases it can be time consuming.
<AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1"> <![CDATA[ <WebPart xmlns:xsd="" xmlns:xsi="" xmlns=""> <Title>Title</Title> <Assembly>Microsoft.SharePoint, ...</Assembly> <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName> <ContentLink xmlns="" /> <Content xmlns=""> <html><b>Hello there</b></html> </Content> </WebPart> ]]> </AllUsersWebPart>
By rewriting characters that cause the parser to think that it is xml will solve your problem. That means that the sign < will be < and the sign > will be >
The following sources are available on the internet:
http://www.peej.co.uk/articles/cdata
http://xml.silmaril.ie/authors/cdata/
http://weblogs.asp.net/bsimser/archive/2005/03/29/396135.aspx
http://www.dpawson.co.uk/xsl/sect2/cdata.html
The SPWebCollection returned by the member SPWeb.Webs is a not sorted list of SPWeb objects. So i wrote a class which makes it possible to return a sorted list of SPWeb objects based on the property of a SPWeb. It is basically very simple and uses some standard .NET interfaces for enumerating and comparing.
SPSortedWebCollection col = new SPSortedWebCollection(currentWeb.Webs, "Number");
foreach(SPWeb child in col)
{
...
}
Reading through my RSS feeds i came accross a post pointing out that Microsoft has released a number of applications for WSS. These applications are from abscense and vacation schedule to Help Desk support. Here are some of them listed:
- Absence Request and Vacation Schedule Management
- Change Management
- Employee Timesheet and Scheduling Management
- Help Desk Dashboard
- New Product Development
- Project Team Site

http://www.microsoft.com/technet/prodtechnol/sppt /wssapps/default.mspx
It took some time to get everything up and running at my new employee, so there is time to start blogging again. I needed some search functionality in WSS while SPS was not installed. I found the following tool:
Tim Heuer already mentioned in a post about this tool found at the website of SharePoint Experts. Its a search tool which makes it possible to search through multiple WSS sites without even SharePoint Portal Server installed. Even the costs are not that high :)
Here some of the features mentioned at their website:
Search multiple sites simultaneously Results are returned from the current site, and all children of the current site
No new UI necessary Search queries are entered using default search box
No complicated install Just back up one file (to be safe!) and drop in our replacement!
Template-based results Customizable XSL templates format the results
Server-side script interface Call PowerSearch™ from any web app by passing URL parameters, and receive XML results (planned feature for next release)
SOAP Web Service interface Integrate PowerSearch™ results into any site design using FrontPage and the XSLT Data View web part, or easily include results in your Windows Forms applications (planned feature for next release)
Custom filters and limits Use the XSLT Data View to apply custom filters and limits to search results, such as "records modified in the past week" (planned feature for next release)
PowerNav™-aware Future releases of PowerNav™ will extend your ability to customize PowerSearch results
http://www.sharepointexperts.com/software_powersearch_wss.htm
http://timheuer.com/blog/archive/2004/08/12/1155.aspx
It seems we have a new blogger in town :) Welcome!! His name is Maxim Tarassenko and he wrote a "how to" article about implementing OWS Web Controls to simplify SharePoint Development.
"In order to simplify SharePoint development, it is possible to use standard web controls implemented in Microsoft SharePoint assemblies and used by SharePoint team throughout the whole SharePoint system. These are for example OWS web controls contained in Microsoft.SharePoint.dll and available both in Windows SharePoint Services as in SharePoint Portal Server."
http://www.dotnetblog.de/PermaLink,guid,9e6c6910-2b91-40cc-94c4-83697913b685.aspx
Modonovan posted an article which explains how to use the IRuntimeFilter to hide or show WebParts in the Portal. as stated in the article:
"By implementing IRuntimeFilter you are essentially creating a rule or a set of rules that determine if a web part should be displayed or not. For example:
- SharePoint Portal Server (SPS) uses a IRuntimeFilter for audiences. A user will setup the audiences that are allowed to see a web part (using the advanced section in the web part’s toolpane), then when a user visits the web page the filter runs and determines if the web part should be shown or not. If a virtual server is extended with SPS then the Microsoft.SharePoint.Portal.Audience.AudienceManager filter is installed by default.
- You could create a custom IRuntimeFilter that determines if a web part should be displayed based on the WSS role the user is a member of. This is what the sample code in this document does
- You could create a custom IRuntimeFilter that determines if a web part should be displayed based on any arbitrary property or rule(s) that you come up with."
I often use some kind of check in my code behind to find out which roles the current user has and then based on the information i show or hide the WebPart. This solution presented by Modonovan is far better. :) Thanks!!
http://blogs.msdn.com/modonovan/archive/2005/07/07/436394.aspx
I was setting up SharePoint Portal Server 2003 on one of my home computers. After installation of the Services Packs i went into the administration website to create a new Portal. Before that i made a folder and added a new website to the IIS 6.0 pointing to that folder.
Strange enough the new created website for the Portal was not selectable. Going into the list of virtual servers showed my why.

It seems that some sites and also the one i just made is set to "Not Administrable". After doing a google search (whichs delivered ony 3 hits on this subject) i found out you had to install the service packs. But i already did that. Today i finally found the solution.
Because i'm not always working at home i use a Removable Harddisk which is FAT32 formatted. It seems that putting the folder on a FAT32 formatted disk is causing this problem. Moving it to a NTFS partition or reformatting the FAT32 partition will solve this issue.
If you create a WebPart containing a multiline TextBox, the TextBox does not size automatically with the width of the WebPart. Requesting the Width of the WebPart is not an option because its not yet in the clients browser. So the following example shows a way of sizing the TextBox to 100% in the WebPart. tbRemark is a TextBox with the TextMode set to TextBoxMode.MultiLine.
protected override void RenderWebPart(HtmlTextWriter output) { output.WriteLine("<style>.StyleRemark { width:100%;height:100; }</style>");
output.WriteLine("<TABLE id=\"Table1\" cellSpacing=\"1\" cellPadding=\"1\" width=\"100%\" border=\"0\">"); output.WriteLine("<TR><TD>");
tbRemark.Text = Remark; tbRemark.CssClass = "StyleRemark"; tbRemark.RenderControl(output);
output.WriteLine("</TD></TR>"); output.WriteLine("</TABLE>"); }
Today i had a head breaking issue. I needed two discussion boards placed on a WSS site using the ONET.XML template. Whatever i tried it resulted into another view of the same discussion board instead of a seperate discussion board. Then i saw it (together with a collegea)...
When you change the application pool for a WSS site and you request the WSS site in a browser you could get a 403 error telling you that access is denied. By adding /default.aspx at the end of the url it works again.
This problem is caused by changing the application pool for the WSS site and not for its Application folders.
To solve the problem just change the application pool for its Application folders to the same as the WSS site. The Application folders I had to change were _layouts, _vti_bin and _wpresources.
"The purpose of the SharePoint Utility Suite is to provide a packaged collection of Tools and Utilities showcasing the rich Object Model that is delivered with the SharePoint Product and Technologies SDK (which includes Windows SharePoint Services 2.0 and SharePoint Portal Server 2003). This package includes code and tool examples that SharePoint Developers and SharePoint Administrators might find useful."
http://www.microsoft.com/sharepoint/downloads/components/detail.asp?a=724
Thanks to Paul Schaeflein and Jessica Gruber
Paul Schaeflein did a post about an example how to programmatically upload a file to a document library. The example is in VB.NET and could be very handy to use in custom made WebParts. Thanks for that! :)
Sub ProcessPostedFile(ByVal fileUpload As HtmlControls.HtmlInputFile) Try ' get the filename and stream Dim fn As String = System.IO.Path.GetFileName(fileUpload.PostedFile.FileName) Dim stm As System.IO.Stream = fileUpload.PostedFile.InputStream Dim contents(CInt(stm.Length)) As Byte
stm.Read(contents, 0, CInt(stm.Length)) stm.Close()
' get the library path Dim docLibPath As String = Configuration.ConfigurationSettings.AppSettings("DocUploadPath") ' first, get the site containing the library Dim site As SPSite = New SPSite(docLibPath) Dim web As SPWeb = site.OpenWeb ' then get the folder Dim docFolder As SPFolder = web.GetFolder(docLibPath)
' delete the file if it exists Dim docFile As SPFile Try docFile = docFolder.Files(fn) Catch ex As Exception End Try
If Not docFile Is Nothing Then docFolder.Files.Delete(fn) End If
' save the file docFile = docFolder.Files.Add(fn, contents)
Catch ex As Exception Context.Trace.Warn(ex.ToString) End Try End Sub
http://sharepointblogs.com/SPDiary/archive/2005/07/12/2632.aspx
Article written by Bil Simser doing the same upload using a HTTP PUT. Meaning that you could use it from any place and not only on the SharePoint server.
http://weblogs.asp.net/bsimser/archive/2004/06/06/149673.aspx

The new Office Business Scorecard Server 2005 Beta 1 is available with the following features and benefits
- Align actions with strategy
- Gain complete insight in context
- Collaborate on business management and action.
- Empower employees to monitor and deliver against key metrics
- Achieve extensible functionality
The Beta software can be downloaded using the following link:
http://msdn.microsoft.com/isv/technology/bss/beta/default.aspx
Rumours says that in the last weeks of july beta 2 will be released. It is worth while waiting for that version to start with :)
I came accros a post, forget from who, referring to a article written by Heather Solomon. It describes a questionaire for SharePoint to gather information for determining which product implementation suit their needs. It helps you to decide between a Portal, WSS or both.
I think this questionaire is very helpfull for this kind of descisions and Heather did a great job posting it for all of us! Thanks Heather.
http://heathersolomon.com/blog/articles/446.aspx
Mark Harrison mentioned the new Telerik site in a post yesterday. It is a company specialised delivering controls to make it for us, as developers, a lot easier. They have a WYSIWYG editor called the r.a.d.editor implemented as a WebPart for easy integration into SharePoint. I'm currently working on a SharePoint project where the user has to make changes to articles using this WebPart.

http://www.sharepointcontrols.com/Default.aspx?PageId=2466
At the blog SharePoint from Scratch an article is posted which describes a ways to delete a personal site in SharePoint. As you know the personal sites exists only in the database and uses the same aspx files. The following walkthrough finds the correct url for the personal site and makes it possible to delete it through the "Site Administration".
- Click on Site Settings.
- Under User Profile, Audiences, and Personal Sites click Manage Profile Database.
- Click View User Profiles
- Search for yourself, hover over your name and select Manage Personal Site. At this point you could get the error User Has Not Create a Personal Site.
- Look at the URL: http://MyPortal/personal/MyUserName/_layouts/1033/settings.aspx
- Now you can add anyone's username to the URL and get the site settings for that user.
- From there, you can click on Site Administration and the Delete This Site.
http://sharepointblogs.com/spfromscratch/archive/2005/06/29/2311.aspx
My collegea Mart wrote an article about the last modified date of a WSS site. The SPSite class has a property called LastItemModifiedDate returning the last date of modified content. If the method GetSubwebsForCurrentUser is used this property does not contain a value when used for the root web. The following definition of both members is found in the MSDN library:
LastItemModifiedDate property of the SPList class gets the date and time that an item, field, or property of the list was last modified.
LastContentModifiedDate property of the SPSite class gets in Coordinated Universal Time (UTC) the date and time when the content of the site was last changed.
Mart and Tariq give us a solution for this problem by getting the SPVirtualServerCollection of the SPGlobalAdmin and then looping through the Sites collection per SPVirtualServer. The property LastContentModifiedData is filled in. :)
Thanks guys! I'm gonna need this in one of my next projects
http://blogs.tamtam.nl/mart/SharePointTipLastItemModifiedDateAndLastContentModifiedDate.aspx
Jan Tielens has posted a nice article about adding WebParts to a WebPartPage programmatically in SharePoint. In his article he discusses two scenarios to accomplish this.
- First scenario is getting the is creating a new WebPart (in his case a ListViewWebPart) and adding it to the SPWebPartCollection.
- Second scenario is building a XML string containing the information about the WebPart and use the SPWebPartCollection to add this string.
http://weblogs.asp.net/jan/archive/2005/06/22/414283.aspx
At the blog #region /* mads's thoughts */ an important article is found called "COM objects need tight leash". It gives an example of increasing memory usage when working with the SharePoint object model and th Office interop components.
In that case it seems that the Garbage Collector was cleaning up the managed references which were wrappers around COM objects and these COM objects were not cleaned up.
I have had a similair problem in the past writing wrapper classes in C# around C++ unmanaged code. The unmanaged code was not cleaned up by the garbage collector ofcourse and you had to do that yourself. http://weblogs.asp.net/mnissen/archive/2005/06/22/414247.aspx
It never hurts to mention this again. Be very carefull when calling the Dispose or Close method on SPSite or SPWeb objects. If the object is a shared resource it will give you a nasty "access violation error". For example never do the following:
SPSite site = SPControl.GetContextSite (this.Context); // Code to perform a task site.Dispose (); -> WRONG
SharePoint will dispose the object if needed so never call the Dispose method in this case. If you create your own SPSite or SPWeb objects you can use the Dispose or the Close method for these objects. In case you're referencing the object never ever call the Dispose or Close method.
See the article referred to below:
http://www.kbalertz.com/kb_901259.aspx
When you create sites programatically they will not show up in the site directory list. I found an article at the website of SPSFAQ with a coding example which will resolve this problem. They got the article from MSD2D. The code is as follows: //Get reference to the portal SPSite myPortal = new SPSite("http://localhost); SPWeb myWeb=portal_site.AllWebs["SiteDirectory"]; SPListCollection myWeblists=myWeb.Lists;
//Get reference to the site directory SPList siteDir= myWeblists["Sites"];
//Add an new entry SPListItemCollection listItems = siteDir.Items; SPListItem item = listItems.Add();
//Assign values to the list columns item["Title"] = objCommunity.Name; item["Description"] = objCommunity.Purpose;
//update the new list item item.Update();
http://www.spsfaq.com/customising.asp?page=8 (SPSFAQ0302106)
Maurice Prather has written a nice article about the recommended way of validating WebPart properties. According to him there are two reasons why you should put the validation in the property's set method namely:
- Performance
- Better visibility of error conditions
I agree with him especially looking at the performance. To read the article follow the link below: http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=178
This is a simple tutorial for adding a new user to give access to the "Scorecard Development Site". This website is de maintainance tool voor de Microsoft Office Business Scorecard Accelerator (MOBSA). Here you can maintain scorecards, KPI's, KPI groups and lots of other stuff.
On the blog of Erol Giraudy i found a link to sample course material for SharePoint 2003 training. As stated on the SharePoint Solutions website:
"All sample course materials are property of SharePoint Solutions and subject to copyright laws. The sample course materials are provided for evaluation purposes only. They may not be copied and/or distributed to any person other than the individual registering on this page."
http://www.sharepointsolutions.com/dwnld8765cg01lpm33324.html
I got a question from Amit Vasu regarding the installation of SharePoint Portal Server 2003 with SQL Server versus MSDE. The issue was that his customer first wanted to use MSDE and if needed later on migrating to SQL Server.
This is possible and i did some investigation on MSDN and found the following. There is an article describing the migration from WMSDE to SQL Server:
http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/stsf17.mspx
After this you have to change the connections in SharePoint Administration of the databases. the following walkthrough describes it:
Open the SharePoint Central Administration website and go to the "Windows SharePoint Services Central Administration". You will find under "Server Configuration" the option "Set configuration database server". Here you can change the configuration database to its new location.

Go to the "SharePoint Portal Server Central Administration". You will find under "Server Configuration" the option "Configure server topology". Here you change the content, component settings and configuration database to their new location.
A new blogger is in town :) Here name is Jessica Gruber and she is consultant with Microsoft Consulting Services in the UK. She will present at two events:
UK Office Developer Conference (29 - 30 June at Heathrow outside London) where I'll be presenting on Developing InfoPath Forms using Managed Code and on Customizing and Branding SharePoint Portal Server and Windows SharePoint Services
TechEd Europe (5 - 8 July in Amsterdam) where my topic will be “Office 12” Preview: Default Open XML File Formats. Happily my session is the first one listed if you use the search tool and search for the "Windows Client Development" track!
I will visit the TechEd Europe and will drop by at here presentation. :)
http://blogs.msdn.com/jessicagruber/archive/2005/06/14/428843.aspx
Google is my number one and favorit search machine and thanks to Mark Wagner i can put it in my SharePoint environment. :)
Mark Wagner has created a custom Google WebPart for a demo SharePoint site. He has provided two downloads. One for the WebPart package and the other containing the source code. As het stated this Google seacrch WebPart is not a replacement for the search feature of SharePoint itself.

There are three search options:
- Standard Google search
- Local Site Search
- Custom Site URL search
http://blogs.crsw.com/mark/articles/1009.aspx
At Microsoft there is a top 10 list of benefits using SharePoint Portal 2003. From that list i think there are some benefits which could be used as reasons for your customer for deployment of SharePoint Portal 2003. They are:
- Put relevant information at your fingertips
- Share knowledge across the organization.
- Find and make the most of organization's intellectual capital.
- Create self-service portals.
- Automate business processes.
- Reduce development time and cost with out-of-the-box portal services
Explaination of these benefits are found in the following MSDN article:
http://www.microsoft.com/office/sharepoint/prodinfo/topten.mspx
A lot of us SharePoint developers know the differences of features between Windows SharePoint Services and SharePoint Portal Server 2003 but it never hurts to point them out again for those who don't know.
As stated in MSDN:
Windows SharePoint Services is a collection of services for Microsoft Windows Server 2003 that you can use to share information, collaborate with other users on documents, and create lists and Web Part pages. You can also use Windows SharePoint Services as a development platform to create collaboration applications and information-sharing applications.
SharePoint Portal Server 2003 is a scalable, enterprise portal server that is built on Windows SharePoint Services. You can use SharePoint Portal Server 2003 to aggregate Windows SharePoint Services sites, information, and applications in your organization to a single portal.
SharePoint Portal Server 2003 includes all features of Windows SharePoint Services and has some additional features. The following table compares the features between the two:
| Feature |
Windows SharePoint Services |
SharePoint Portal Server 2003 |
| Alerts |
Yes |
Yes |
| Browser-based customization |
Yes |
Yes |
| Discussion boards |
Yes |
Yes |
| Document libraries |
Yes |
Yes |
| Document Workspace |
Yes |
Yes |
| Meeting Workspace |
Yes |
Yes |
| Lists |
Yes |
Yes |
| BizTalk integration |
No |
Yes |
| Microsoft FrontPage 2003 integration |
Yes |
Yes |
| Microsoft InfoPath 2003 integration |
Yes |
Yes |
| Surveys |
Yes |
Yes |
| Templates |
Yes |
Yes |
| Web Part pages |
Yes |
Yes |
| Automatic categorization |
No |
Yes |
| Audiences |
No |
Yes |
| Topic areas |
No |
Yes |
| News |
No |
Yes |
| Personal sites |
No |
Yes |
| Shared services |
No |
Yes |
| Single sign-on |
No |
Yes |
| Site directory |
No |
Yes |
| User profiles |
No |
Yes |
This information came from the following MSDN article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;830320
If you need more information for your decision of deployment read the following white paper: "Deciding When to Deploy Microsoft Windows SharePoint Services and Microsoft Office SharePoint Portal Server 2003"
The relationship between Windows SharePoint Services and SharePoint Portal Server 2003 is described in the following article:
I found a cool article at Mads's thoughts about setting a custom WebPart property in the dwp file. Setting the initial value for a custom property is mostly done by hardcoding the value in your control. He describes a way to to this through the dwp file of the WebPart. As he stated:
You've got to annotate the webpartclass with a reasonable namespace like this:
[DefaultProperty("Text"), ToolboxData("<{0}:SearchForm runat=server></{0}:SearchForm>"), XmlRoot(Namespace="Some.Reasonable.Namespace" )] public class SearchForm : Microsoft.SharePoint.WebPartPages.WebPart { ... }
And then tag your property elements in the dwp file with the same xmlns:
<UserControl xmlns="Some.Reasonable.Namespace">URI</UserControl>
And your webpart has an initial propertyvalue after deployment.
http://weblogs.asp.net/mnissen/archive/2004/05/20/135744.aspx
In one of the portals we removed the "Site settings" link from the page to prevent users clicking on it. For some additional users which have administrator rights we created a WebPart containing links to the most needed functionality. This custom WebPart contains a direct link to the settings of the current page, a direct link to the settings of users of the current page and a link to delete the current page and its children.
I got a question from someone if it is possible to remove the help link from the webpart menu. And if possible to remove the whole webpart menu itself. The answer the first question i did some digging and found out the following stuff.

If we take a custom webpart, to remove the menu, or one or more menu items it is relative very easy. I wrote already an article about this. This can be easily accomplished by overriding the CreateWebPartMenu() method. and if needed setting the this.WebPartMenu = null;
To remove the Help from the menu you could also go into "Modify Shared WebPart" and clear the "Help Link" field under the "Advanced" category.
If we take a default webpart like a list or event, it seems that it does not work that way. These default webpart have already a "Help Link" filled in. Clearing the "Help Link" will not do anything and going into the "Modify Shared WebPart" will return the original url. It is possible to change it and it is reflected when you select the help from the menu but as soon as you go into "Modify Shared WebPart" it is returned to its original state. Meaning that when OK or Apply is pressed you back to start.
Why? I don't know. Feature or bug? I also don't know
Maurice wrote last year an article about the benefits of closing an disposing SPSite and SPWeb objects. In most cases it is therefor usefull to use the using functionality of .NET.
IMPORTANT:But as he stated in his last post you should never call dispose on a reference got from a SPSite by calling the method SPControl.GetContextSite. Only call Dispose() and Close() on your own objects.
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=175
Thanks Maurice for pointing this out to us! :)
Mike Fitzmaurice is talking about the SharePad project which can be found on GotDotNet. If you want to add document library support for your own editor you will have to use the FrontPage RPCs according to Mike. As stated on the website of GotDotNet:
"SharePad is a reference application demonstrating Microsoft Office-style SharePoint integration techniques. This application illustrates the use of the Front Page RPC calls exposed by SharePoint among other SharePoint integration APIs."
The following functionality is available:
Open a file that’s stored in a SharePoint document library
Save a file to a SharePoint document library
Navigate through the libraries in a SharePoint site
Check out the file
Check in the file
Register it within the WSS/SPS environment so it launches your editor automatically (like we do for Word, Excel, and PowerPoint documents)?
Set custom properties on the file as you save it
Read a file’s custom properties at the time you open it
http://blogs.msdn.com/mikefitz/archive/2005/05/30/423276.aspx
Tech-ed 2005 in the Netherlands is taking placed from july 5th til 8th and has some interesting sessions about SharePoint 2003. I have listed the descriptions of each session and they can also be found on the website for tech-ed. One session is not yet described and i'm looking foward to see wat the contents will be.
One of the sessions "Best Practices for an implementation" is about ten key areas of planning needed when desiging your portal. It also discusses what todo when a SharePoint Portal is already deployed and how to make adjustments in the design.
Sessions so far:
Developing Site Definitions and Templates for Windows SharePoint Services>
Developing with SharePoint Portal Server 2003, Outlook and Exchange: Advanced Integration
Getting Back to Normal: SharePoint Backup and Disaster Recovery
Maximizing SAP with SharePoint and Other Microsoft Technologies
MS IT: SharePoint Products and Technologies: Performance and Capacity Planning Best Practices and Lessons Learned
SharePoint Portal Server 2003: Best Practices for an Implementation
Bil Simser wrote two articles about so called YAUSF (Yet Another Undocumented SharePoint Feature). One article is about a telephone pattern were he is still working on. And the second article describes a hidden DisplaySize property for defining the length of a text field.

Both involves changes in some xml files but are not documented by Microsoft. The risk will be there that in a next version of SharePoint this is obsolete or changed. Lets hope that the guys at Microsoft read these articles and hopefully decide to leave this in and start documenting :)
http://weblogs.asp.net/bsimser/archive/2005/05/28/409568.aspx
http://weblogs.asp.net/bsimser/archive/2005/05/29/409642.aspx
For one of our customers a SharePoint portal is build containing monthly reports for their customers. For each customer a tree-like structure of sites and sub sites is created showing the report data in several ways. We created a WebPart which makes it relative easy for the customer to generate the tree-like structure of sites. A short and long name are entered for a new customer and generates the site and sub sites.
Christopher Walker wrote a simple walk-through for building a form field to filter the contents of a DataView web part. As he said:
"The idea is to effectively create a simple "search" facility on a Data View web part, which is enabled by creating a Form Web Part with a single text field that provides this value as input to the Data View, the Data View is filtered based on the input value."
http://blogs.msdn.com/cjwalker/archive/2005/05/25/421980.aspx
It is some time ago that Maurice Prather at BlueDogLimited has posted an article about debugging Web Parts. As he stated debugging Web Parts is not that difficult. In his article he starts with the basics describing the CallStack and customError nodes in the web.config file.
The second part is more advanced and explains why you don't have to set debug="true" and trust level to "Full".
A very important remark which i totally agree with in his article is:
"More importantly, if you’re trying to track down problems associated with code access security, setting the trust level to a higher state simply hides the very same problems you were attempting track down."
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=60
For one of our customers we needed a specific overview of their KPI's (Key Perfomance Indicators) per defined SLA (Service Level Agreement). The standard Web Parts deliverd by MOBSA (Microsoft Office Business Scorecard Accelerator) were not providing enough possibilities. We decided to build our own custom Web Part using the MOBSA API. It is a very powerfull API and in this example we use it for showing multiple KPI statuses per defined SLA.
Shane started a weblog about customizing SharePoint websites. He uses FrontPage 2003 for customization of all SharePoint to give it a look as a "real" website.
"This entry will likely span into a 4-5 part tutorial on creating a SharePoint site that looks like a "real" website.
I'll try and take things step-by-step in creating a "real website" and then converting it into a SharePoint site. I will keep it as simple as possibe so that it's relatively easy to follow.
For anyone that just wants to follow along and get their feet wet I will include everything I've used for the site creation, HTML/Graphics/CSS etc.
This will be a fairly long post(s) but hopefully if there are a few people out there experiencing the SharePoint (Learning Pains) this should help you."
http://www.graphicalwonder.com/archives/2005/05/stepbystep_tuto.html
Packaging and deploying a web part is not that easy but it looks nice and cool when you send your customer a MSI (Microsoft Self Installer) file. This article describes in a few steps what you have to do to create a MSI file. For more information i refer to the link at the bottom of this post which explains more in detail...
If you want to use functionality like SPControl.GetContextWeb(Context).Lists and your trust level is set to WSS_Minimum the code will throw an System.Security.Exception telling you that:
Request for the permission of type Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c failed
This means that the code is partial trusted. Normally if you install your assembly in the GAC it runs with "Full" trust. Microsoft recommends that you install your web part assemblies in the BIN directory for a more secure deployment. Therefor the code becomes partial trusted and some functionality is prohibited by the CAS (Code Access Security) and the trust level set in the web.config...
Sometimes you decide to move a created Web Part to another namespace in another assembly. Whenever you do that the Web Part from the first assembly will still show up in the "Virtual Server Gallery" even if it is not present anymore in that assembly.
Solution Go to the folder "wpcatalog" under your SharePoint web folder and there you will find a list with all dwp files from the "Virtual Server Gallery". Remove the old dwp file and refresh your browser. The Web Part will not show up anymore.
Thanks to my colleague Mart Muller for this simple solution :)
Todd Bleeker wrote an article in SharePoint Advisor Magazine about "Secure SharePoint Code Using Credential-less impersonation". He Describes a very cool method using the App Pool identity to complete tasks where the authenticated user doesn't have permissions for...
Patrick Tisseghem wrote a nice article about handling postbacks in web parts. This is always a problem in SharePoint. By checking the IsPostBack in the Page_Load member will often result in inapproproiate behavior...
When you use properties you only have a few possibilities. Checkboxes are used for booleans, Text fields are used for doubles, int, strings, etc and a dropdownlist is used for enumerations.
So why not create your own ToolPart with default and/or your own controls? It is even not that difficult. :)
I'm working on a BirthdayWebPart which needs some functionality to select through a dropdown box the contact list. But only enumerations are shown using a dropdown list. So we have to write our own ToolPart...
Some time ago Lamont Harrington wrote a nice article about SharePoint Web Parts and SqlClientPermission errors. In some cases when you develop custom web parts that connects to a SQL server you may be confronted with a nasty error. This is caused by the .NET Code Access Security (CAS). The following article describes a solution:
http://blogs.msdn.com/lamonth/archive/2005/02/13/372075.aspx
I'm always surprised that SharePoint developers do not often use more web part menus instead of adding ToolParts. The user doesn't have to go into edit mode which makes it more user-friendly.
This article decribes a method for adding an item to the menu of the web part. The menu of a web part can be found in the upper right corner...
Mart Muller wrote a great tip about creating alerts programatically:
In some cases you want a user to automatically create alerts on particular lists, for example an action list. It's very easy to achieve that:
SPWeb thisWeb = SPControl.GetContextWeb(Context); thisWeb.AllowUnsafeUpdates = true; SPList myList = thisWeb.Lists["ListName"];
// in this case a daily alert on all list actions thisWeb.CurrentUser.Alerts.Add( myList,SPEventType.All,SPAlertFrequency.Daily); thisWeb.CurrentUser.Update();
The same way, alerts can be added for list items.
Some weeks ago i wrote an article about creating a birthday webpart. The problem with that webpart is that the list every time has to be updated to refresh the coming birthdays.
This is an example of a custom webpart which retrieves its information from a ContactList...
The BirthDay WebPart version 1 is now downloadable. Follow the link: TamTam_BirthDay_WebPart.msi (132 KB)
A SPQuery can be used to retrieve some SPListItems from a SPListItemCollection. The following code is an example which shows how to do a DateTime comparison. It is very important to use a correct date format as the value in the inner xml of the where clause...
I got a request from the customer to change the background color of a WSS / Portal page depending on the login rights. This example delivers an example which will do this. But the same example can be used to override any other style defined in SPS.css and OWS.css.
I was looking for a solution to remove the link "my site" from the top banner. After googling i found the following solution by Mark Beecham at Ted's SharePoint blog...
I'm writing some custom web parts for a Portal site of one of our customers. At some point i was testing the code with a user from a different site group. In this case it was the "reader" site group. It seems that some functionality i was using was not available anymore due to CAS (code Access Security) in the SharePoint assemblies...
This web part is a very simple but handy part to show coming birthdays of people. You only use standard controls from SharePoint and you do not have to program anything. It also shows how to use some functions which are not directly available in calculated fields but can be used with a simple trick. so far as I know this trick be used for any other function which is not available for calculated fields. The following describes the steps to create this web part...
One of the most common requests is how to add an icon for PDF documents and have PDF documents indexed in SharePoint Portal Server 2003.
This article decribes how to enable the Session State in SharePoint...
This is an example of connecting two consumer webparts to a provider webpart through a site template. One of the consumer webparts is a “ScoreCard Standard View” and the second one is an own defined webpart showing a remark about the period. The provider webpart is a derived class from “ScoreCard Dimension Slicer”.
Microsoft Office Business Scorecards Accelerator is installed as an add-on for SharePoint on a Windows 2003 server. Adding webparts to SharePoint is very easy todo, but when you try to derive from these webparts or even want to use classes from the assembly you may find it difficult to get the assembly referenced.
Follow the steps described below:
1) use a command prompt (dos box) to copy the assembly from the folder c:\windows\assembly\gac\msscorecardwebparts\<version number> to another folder. This can not be done using the windows explorer because copying from the GAC is not allowed from there.
2) Add the following key to the registry so Visual Studio.NET will show the assembly in the “Add reference” dialog.
registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
Create the key “ScoreCards” with the default value set to the folder in which the copied assembly can be found.
3) Restart Visual Studio.NET
4) Goto the “Add reference” dialog and you can reference the assembly. The assembly will be automatically taken from the GAC.
It is always a lot of work and sometimes it gives you a lot of problems installing web parts in a safe way. Searching through the internet via Google i found the following link to a nice tool which easily installs web parts in the bin folder or GAC, creates dwp files and even changes the web.config for you.
http://www.microsoft.com/sharepoint/downloads/components/detail.asp?a=431
Thanks to the author Alan Smithee.
|
Copyright © 2010 Alexander Meijers. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme:
|
|