SHAREPOINT ERRORID: 7888 : Windows NT user not found

I noticed in my eventlog that SharePoint often encountered an error with error ID:7888.

A runtime Exception was detected.Details below
Message: Windows NT user or user group 'demo.local/admin' not found.Check the name again.

After some research i discovered that SharePoint doesn't like the notation dome.local/username at all.

Microsoft typically doesn't do too well with FQDN\ServiceAccount syntax.
Since SharePoint was using that somehow (either in the application pool or service, etc), it was giving you that error message.

SharePoint in particular only wants Application Pool accounts to be configured in the NETBIOSDN\ServiceAccount syntax, so it can easily parse out the domain name.

As to why UPNs don't work…I assume it is so fewer LDAP queries are required to get your system up and running as quickly as possible, and the same goes for FQDN syntax.


Change the credentials in the IIS manager:

properties of the pool -> identity -> change demo.local\ to demo\ and reset the IIS.

The error never returned to my eventlog.

hope this helps.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Create Context Sensitive Menu

Create sensitive menu using Core.js

The context menu is itself a JavaScript program means that the context menu is generated by a JavaScript code. This JavaScript program can be found at

\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\Core.js

In the Core.js file the main function responsible for the document library drop down menus is AddDocLibMenuItems(m, ctx) and this provides a hook by which we can insert additional menu items.

The first few lines of the function are as follows

if (typeof(Custom_AddDocLibMenuItems) !=”undefined”)
{
if (Custom_AddDocLibMenuItems(m, ctx))
return;
}

It is basically looking as to whether a function named Custom_AddDocLibMenuItems is defined or not, if it is defined then it simply calls it. So the main idea here is to override this Custom_AddDocLibMenuItems function by our own script which we can use to extend the context menu, adding new items.

Now we can override the Custom_AddDocLibMenuItems function in core.js adding our own script as follows.

function Custom_AddDocLibMenuItems(m, ctx)
{
var strDisplayTextCustom = 'View Excel Sheet in Browser';

setDocType();

if(currentItemAppName.toLowerCase() == “microsoft office excel”)
{
strAction=”alert(ctx.HttpRoot+unescapeProperly(currentItemFileUrl))”;

var strImagePath = ctx.imagesPath+”XLS16.GIF”;

// Add menu item
CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);

// add a separator to the menu
CAMSep(m);
}
return false;
}

How does the function above works?
The Custom_AddDocLibMenuItems function takes two parameters m and ctx, the first parameter m is basically representing the menu object itself, where as ctx provides HTTP context information about the web request. To add an item to the menu only one function call is needed.

CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);

The CAMOpt function takes 4 parameters which are as follows:
1) The menu object to add item to.
2) The display text of the menu item.
3) Javascript action to perform when item is clicked.
4) Path to an image associated with the menu item.

CAMSep function simply adds a separator bar to the menu. Finally the function returns a false which means that standard menu items should also be included, if we had returned true then standard menu items would not have been included.
But when a new service pack is released, the new added Custom_AddDocLibMenuItems method could be deleted!

Create sensitive menu using webpart

When you open the document library where you want to create a context sensitive menu, you can add a webpart. Select Edit Page add a new content editor webpart and add the function from above in this source code.
When you open this document library now, you'll see that when you open the menu the custom menu items appears. And when a new service pack replaces the core.js your context sensitive menu's are save.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Create Custom Templates in SharePoint 2007

Working with sharepoints involves creating sites that have many common items.

First of all it's best to think about what are the items that will return every time I create a new Customer Site in The SharePoint portal.

Next create a new site where you add al these listed items(document libraries, contacts, discussion groups,themes,etc etc..)

when you are sure that every item you need is added to your site you can create a site template of this empty site.

Site Actions > Site Settings > Save site as template

when you click on the Save as template link, you receive a page similar to this one:


After Providing a filename, name and discription you press OK, after a short moment the template has been saved and when you create a new site you can see that there is an extra templatepanel available called: Custom


After selecting the correct custom template and creating the new site, you'll notice that this new page contains all the definied elements from the template.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Microsoft Office SharePoint Server 2007


From this day I will focus myself, next to early adapting new Microsoft technologies and developing, to the wonderful world of SharePoint.
So don't be surprised when you encounter more and more topics about SharePoint on this blog.
I hope you find it as interesting as I do :)

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Microsoft Tech Days 2008

Today i received this mail:

Dear Tom Van Gaever,

We are pleased to officially confirm your complimentary ticket for the Full Launch Experience, including the 2008 Launch Event and TechDays 2008.
The event takes place on the 11th, 12 & 13th of March 2008 at the International Convention Center (ICC) in Ghent.

We look forward to welcoming you in Ghent,

The TechDays Team
register@msevents.be

See You There?

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Linq samples

That last one is the most interesting to me. It includes hyperlinks to many sample projects on your machine. Clicking on “Visual C# Samples” will open a ZIP file that has two folders in it, one of them called “LinqSamples” that contains the BuildSamples.sln. Open that and you'll have 15 very interesting projects.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Visual Studio 2008 Enhancements

With this new feature in 2008 version of visual studio 2008, you can clean out all the references to assemblies that you are not using.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)