Presence in your own apps!

Bart Wessels’ blog caught my eye once more, blogging about the possibility of adding presence to your own applications. This means you can enable the little popup menu, showing the users’ IM status, availability and contact information, in your own (webbased) applications. Very exiting and I will definitely be trying this soon. I am curious if this will work with MSN Messenger too, since the Microsoft site explicitely talks about Communicator (the business-MSN), but I’ll report back on that.

To download:

Microsoft Presence Sample for AJAX Based Web Client

Microsoft Presence Sample for Smart Client Applications

Microsoft Presence Sample for Web Based Applications

Exchange OWA without Forms Authentication

In many organizations, Outlook Web Access is used to enable employees to view their e-mail and calendar online. In most cases, the enabled access uses Forms Authentication to display a neat Outlook login form in which users may enter their accountname and password to gain access to the web access environment.

SharePoint is able to use this ‘access point’ to display information like e-mail, appointments, etc. on a (my)site. But now the catch… those Outlook Web Parts don’t work with forms authentication enabled. So what we need is a second access point to enable SharePoint to pass on the users’ credentials via Integrated Authentication. Read More

Adding a task for multiple persons

A while ago, a user asked me why he wasn’t able to add a task to a default SharePoint tasklist and assign it to multiple persons. I wasn’t sure about this so I checked myself and indeed I wasn’t able to do this either. For some reason I didn’t really look too hard and didn’t found a solution, but luckily Bart pointed me in the right direction. The (quite easy) solution is to alter the ‘assigned to’ colum via the list properties. There you may set the ‘allow multiple selections’ property to true to enable users to select more than one person or group.

Maybe not that astonishing, but I couldn’t find this one at first so maybe this post turns up in your search results while looking for the same solution 😉

By the way, this solution doesn’t always apply. For instance, in the profile properties of a user there’s a column named ‘Assistant’. This column is also of the ‘Person’ columntype, but you cannot set an ‘allow multiple selections’ property here unfortunately. But hey, who needs multiple assistants if they’ve got SharePoint and Office? 😉

Job opening

As I’m writing this I’m on ‘holiday’; that is not working in the IT business. Before I started my job I was earning some money designing and operating lighting for theatre, popshows, etc. Currently I’m doing that again, and it feels good to be back! Finished the first gig yesterday where everyone was very pleased including myself , and the second one starts tomorrow which will last for a week. So untill then no tech articles, sorry!

As for the title of this post: we’re hiring new employees and we need them bigtime! So if you’re in Holland and in need of a job, please react to this post so we can get in touch. We’re hiring system engineers as well as software engineers (mainly Progress though) so if you’re interested let me know! By the way, we’re in Breda, Holland. Cya!

Alternate Access Mappings

After installing and setting up a MOSS environment, we want to make sure our users have easy access. Most of the times the computername is selected by some network administrator and doesn’t match what we think is easy. Adding a DNS records and alternate access mappings can solve this problem if installed the right way.

This can be done like this:

  • Setup a DNS record to forward a friendly name like to the IP address of your server.
  • Add an ‘alternate access mapping’ to the new dns name in SharePoint. This is done via the ‘Alternate access mappings’ menu item which is found under ‘Global Configuration’ on the Operations page of the Central Administration Pages.
  • Make sure IE knows this page is on the intranet if it’s asking for login data in a prompt (which you don’t want I presume). I didn’t know this, but adding the site to the ‘trusted sites’ list isn’t the correct solution: you really have to add it to the ‘intranet’ category.

After these 3 steps, users should be able to visit your sharepoint site via without receiving a login prompt (when visited internally offcourse; this doesn’t apply for internet connections).

Integrated security and SQL Server in ASP.NET

On a project I’m currently developing I needed to keep track of changes to database records made by users. Typically you would add 4 columns for this purpose: CreatedBy, CreatedOn, ModifiedBy and ModifiedOn. Filling these columns can be done via business logic offcourse, but I was looking for a sweeter solution (and found one!).

As most of you guys probably know, getting the current date/time isn’t that hard in SQL code. Just use the GETDATE() function as the default value in you INSERT and UPDATE queries. Ok, but how about the username? Here’s where integrated security is going to help us.

ASP.NET provides integrated security to be able to use the Windows account of the user using your application for other things in need of authentication (writing files, connecting to other computers, and also to SQL Server databases). The only thing you need to do to enable integrated security is setting <identityimpersonate=true/> and <authenticationmode=Windows/> in your web.config file. Using integrated authentication with SQL Server isn’t that hard either; just provide the string Integrated Security=True in your connectionstring.

Now you need to grant access to the domain users to your SQL Server database. Default public rights are enough here, don’t overdo it because you don’t want to grant too much rights to all of your Active Directory users. That’s it! To retrieve the username of the user currently logged into SQL Server you may use ‘USER_NAME()’ in your queries. So now you’re ably to fill all 4 columns mentioned above without having to write a single line of code; isn’t that sweet!?

Crystal Reports Web Part – part 2

Earlier, I wrote a blogpost about creating a web part to display Crystal Report files. The biggest problem faced was the displaying of images on a report (which include graphs, pie charts and more stuff like that) which wouldn’t work in a MOSS environment. I solved it by creating a second web application to ‘host’ the imagehandler which handles the image requests made by IMG SRC=” tags.

On the MSDN Forum, I found a post made by someone with a similar problem. After solving the problem I replied posting my solution and left it alone. Luckily, I had the post alerts still on to notify me about a new reply being posted. Svetlana came up with two interesting solutions for the exact same problem, which are a bit more elegant if you ask me:

  • Rename the CrystalImageHandler.aspx file to a different extension, so the MOSS handler won’t pick it up. Offcourse you’ll have to alter the web.config to include a handler to the correct file.
  • Place a custom made CrystalImageHandler.aspx file in the TEMPLATE/LAYOUTS directory of the 12 hyve. Now write a regex which will replace all calls to the old imagehandler with a call to that file which will be in the _layouts directory of your web app.

I’ll see if I can post the contents of the CrystalImageHandler.aspx file and the web part regex to get you guys on your way. And again: thanks to Svetlana for providing this solution!

Update! The fully functional, ready-to-go web part with installation guide and support is now on sale!

No permission to create MySite

After switching the authentication provider on our SharePoint installation from NTLM to Kerberos (which should be better), users started to complain that they weren’t able to create a MySite anymore. I checked and offcourse they were right.

To use Kerberos, I had to change the application pool account to the Network Service. That account isn’t a Farm Administrator by default, so you’ll have to add it to that group via the Central Administration pages. After that it should all work again.

By the way: on creation of the MySite, the error received states that the permissions to create a MySite were turned off. That’s very misleading because they weren’t!

Printing SharePoint lists

In a blogpost by Ishai I found some code which enables users to print out lists in a printerfriendly view; something which is missing in SharePoint by default.

To enhance the feature a little bit more, you can edit the printlist.xml file to include a description (which is displayed below the title of the menu item) and an image (which is displayed in front of the image).

For instance:

<CustomAction Id=”SPSTIPS.PrintListActionsToolbar”
Description=”Open deze lijst in afdrukweergave in een nieuw venster.”
<UrlAction Url=”{SiteUrl}/_layouts/PrintList.aspx?list={ListId}”/>

The image you use should be a GIF with a dimension of 34×34 pixels. Place it in the TEMPLATE\IMAGES directory in your 12 hyve.