Blog Home  Home Feed your aggregator (RSS 2.0)  
My DasBlog! - Monday, August 29, 2005
newtelligence powered
 
# Monday, August 29, 2005

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)

Monday, August 29, 2005 11:42:07 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Friday, August 26, 2005

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. :)

Friday, August 26, 2005 6:34:54 AM (GMT Daylight Time, UTC+01:00)  #    Comments [1]   SharePoint  | 
# Monday, August 22, 2005
R.I.P. by alexander

I have sad news :(

This weekend one of my fish i got from Tam Tam past away. The black one, called Paul, to be precise. I gave him a worthly funeral. I even put a picture of another fish next to the bowl so the other one is not feeling alone...

Rest In Peace...

Monday, August 22, 2005 10:53:28 AM (GMT Daylight Time, UTC+01:00)  #    Comments [3]    | 
# Wednesday, August 17, 2005

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.

Wednesday, August 17, 2005 11:28:27 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2]   SharePoint  | 

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=""> 
            &lt;html&gt;&lt;b&gt;Hello there&lt;/b&gt;&lt;/html&gt;  
        </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 &lt; and the sign > will be &gt;

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

Wednesday, August 17, 2005 10:07:55 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Monday, August 15, 2005
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)
{
...
}
Monday, August 15, 2005 10:05:09 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   C# | SharePoint  | 
# Monday, August 08, 2005

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

Monday, August 08, 2005 7:13:46 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Friday, August 05, 2005

It seems that SharePoint is really important for Microsoft! Bill Gates has taken the lead of PM manager himself on the windows SharePoint services v3 User Experience.

That's great news!! :)

http://blogs.msdn.com/bowerm/archive/2005/08/03/447378.aspx

Friday, August 05, 2005 1:16:23 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 

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

Friday, August 05, 2005 10:00:37 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   SharePoint  | 
# Monday, July 25, 2005
AJAX is a very cool technique. No more rountrips to the server. Real-time updating is at hand. The interactivity and user experience grows dramatically. AJAX (asynchronous Java-script + XML) is fantastic, AJAX is new, AJAX is hot!!!! But what is it? Imagine a search engine which gives you instant feedback on the number of results that match your query... Imagine a data entry application that validates upon entry... Imagine a poll on a website which automatically updates any changes...

Monday, July 25, 2005 3:50:03 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]    | 
Copyright © 2012 Alexander Meijers. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: