Tuesday 26 February 2008

On a different subject, Outlook Crashing

On a different subject, I had Outlook 2007 keep crashing on me yesterday when ever I'd reply to an email or Start a new email. The Office Diagnostics didn't find a problem.

After much looking into it deeper, I managed to find the problem. Some of the customised menu items (I think it was the google search) was causing the problem. After deleting the file outcmd.dat - find it in the hidden folder -c:\Documents and Settings/username/ApplicationData/Microsoft/Outlook - just rename it to outcmd.old. When you restarted Outlook 2007, it will create a new fresh file. Lost my menu customizations, but no big deal - at least it does not crash now.

Monday 25 February 2008

"0x80040E14" or "HTTP 500" error message when you connect to your Windows SharePoint Services Web site after you install a Windows SharePoint Services

If anyone has come across this error:

Exception from HRESULT: 0x80040E14. Troubleshoot issues with Windows SharePoint Services.
HTTP 500 - Internal server error


either in search error logs or event error logs, specially after installing a service pack or a hot fix, there's an easy fix.

The main cause of this error is when the content databases in Windows SharePoint Services are not updated correctly during the installation.

Simply go to a command prompt and type:
cd /d %commonprogramfiles%\Microsoft Shared\Web Server Extensions\60\Bin stsadm -o upgrade -forceupgrade
This is a fix for both WSS 2.0 and WSS 3.0. If you're still having the problem, please let me know.

Friday 22 February 2008

Cascading Drop Down Lists

I was trying to find a way to do Cascading Drop Down Lists in SharePoint, and I came across this interesting article.

http://datacogs.com/datablogs/archive/2007/08/26/641.aspx

It shows you how to do it. If you have any problems, let me know.

Fadi

Thursday 21 February 2008

Performance with large lists...

I have been looking around and playing with lists with over 2000 items in them. Although it is not hard limited to it, some (not all) systems with list over 2000 items do have performance issues. Here's a couple of links that are usefull:


I will play around with it a bit and see if I can find some solid evidence that SharePoint lists should not have more than 2000 items. If anyone has such proof, please send it to me.


Fadi

Wednesday 20 February 2008

AJAX and Web parts.

If anyone has followed my example of the Web Part that uses AJAX, they would have found some strange issues. When you modify the web.config, you will notice that it's still posting back to the server. The only way to let the changes to the web.config kick in is to restart your server. IISreset doesn't do it. Im still investigating why a reboot is needed. If anyone know why, please let me know.

NEW:
if you restart the http service as well as IIS it will fix the issue. To restart the http server and IIS, here's the steps:
  • net stop http /y
  • net start http /y
  • IISReset /start

let me know if you experience the same issues I did.

Fadi

Tuesday 19 February 2008

Exception from HRESULT: 0x80040E2F, what does it mean?

Some of you during a restor (STSADM restore that is) might have come across this erorr:

Exception from HRESULT: 0x80040E2F

This HRESULT simply means, "Violation of PRIMARY KEY constraint ", which generally means one thing, you have entries in the database for this site previously, possibly orphaned, that is preventing the restore to continue.

Sometimes a simple -overwrite after the restore command would work, but sometimes the problem isn't that there was orphaned data to begin with, but rather "New" data related to the site added outside of the restore, that then causes the restore to fail.

The reason in this case, may be due to the fact that while the restore is progressing, the site isn't locked and therefore users accessing the site is causing the duplicate entries.

2 easy ways to fix this:

  • Lock the site from Central Admin
  • Switch off the site from IIS and remember to start it once the restore is complete.

This should fix your problem. If you are still having this issue, let me know and ill see if i can help.

New Daylight Savings Issue with SharePoint 2007

With daylight savings time changing in Australia, this could cause some issues with WSS 2.0 and WSS 3.0. There's an easy fix for this problem. Go to http://technet.microsoft.com/en-au/bb978329.aspx and follow the instructions. If you still have a problem following the instructions, please let me know and I will put details instructions up here for you to follow. But basically there's a few things to do:
  • Apply the latest cumulative time zone updates to the host Windows Server operating system.
  • Apply the latest hotfix or service pack to WSS to rectify known daylight saving issues and obtain the most recent version of TIMEZONE.XML.
  • Update TIMEZONE.XML to reflect the changes in daylight saving time.
  • Use the SharePoint TZMOVE function to adjust any time-dependent data items that fall between the old and new daylight saving times.

Tuesday 12 February 2008

Announcing the Final Release of VSeWSS 1.1 (and the upcoming version 1.2)!

Its out, download it from here. Here's some of its features:

What's New in VSeWSS 1.1?

  • "WSP View", aka "Solution Package editing"
  • No more hidden, non-editable solution content!
  • Create new Features
  • Reorder Elements between Features
  • Conflict validation against existing Features
  • Rename existing Features
  • Change Feature activation order

Visual Basic support!

New Item Templates:

  • "List Instance" project item
  • "List Event Handler" project item
  • "SharePoint Template" item template, e.g. "layouts" files

Faster F5 speed (The tool no longer performs an IISReset. Now it only recycles the app pool.)
Solution Generator: you can now choose which lists should be included when exporting a site.
Many bug fixes, e.g.

  • No more GUIDs in Feature Names
  • Support complex project names, e.g. with periods.
  • Can deploy assemblies to the bin folder, instead of GAC

Plus many more. Download it and let me know what you think.

Fadi.......

Monday 11 February 2008

AJAX/ASP.net in a Sharepoint Web Part

I've been playing around with AJAX and web parts. Here is a sample web part that uses AJAX. Simple two linkbuttons that if you click one, is says hello xxxxx (and xxxxx is what you put into the text box) and the second link says goodbye xxxxx. If you need any help modifying it, please let me know. Remember, you need the service pack installed for this to work.


using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Sample.SayHello
{
public class SayHelloWebPart : WebPart
{
private Label displayName;
private TextBox inputName;
protected override void CreateChildControls()
{
base.CreateChildControls();
//Fix for the UpdatePanel postback behaviour.
EnsurePanelFix();
LinkButton btnHello= new LinkButton();
LinkButton btnBye = new LinkButton();
UpdatePanel refreshName = new UpdatePanel();
ScriptManager scriptHandler = new ScriptManager();
displayName = new Label();
inputName = new TextBox();
//Set up control properties.
this.displayName.ID = "displayName";
this.displayName.Text = "Hello!";
this.inputName.ID = "inputName";
btnHello.ID = "btnhello";
btnJan.Text = " Hello ";
btnBye.ID = "btnBye";
btnBye.Text = " Goodbye";
scriptHandler.ID = "scriptHandler";
refreshName.ID = "refreshName";
refreshName.UpdateMode = UpdatePanelUpdateMode.Conditional;
refreshName.ChildrenAsTriggers = true;
//Add the EventHandler to the Button.
btnHello.Click += new EventHandler(ClickHelloHandler);
btnBye.Click += new EventHandler(ClickByeHandler);
//Add the user interface (UI) controls to the UpdatePanel.
refreshName.ContentTemplateContainer.Controls.Add(this.inputName);
refreshName.ContentTemplateContainer.Controls.Add(btnHello);
refreshName.ContentTemplateContainer.Controls.Add(btnBye);
refreshName.ContentTemplateContainer.Controls.Add(this.displayName);
//The ScriptManager control must be added first.
this.Controls.Add(scriptHandler);
this.Controls.Add(refreshName);
}
private void ClickHelloHandler(object sender, EventArgs args)
{
this.displayName.Text = "Hello "
+ this.inputName.Text.ToString() + ".";
}
private void ClickByeHandler(object sender, EventArgs args)
{
this.displayName.Text = "Goodbye "
+ this.inputName.Text.ToString() + ".";
}
private void EnsurePanelFix()
{
if (this.Page.Form != null)
{
String fixupScript = @"
_spBodyOnLoadFunctionNames.push(""_initFormActionAjax"");
function _initFormActionAjax()
{
if (_spEscapedFormAction == document.forms[0].action)
{
document.forms[0]._initialAction =
document.forms[0].action;
}
}
var RestoreToOriginalFormActionCore =
RestoreToOriginalFormAction;
RestoreToOriginalFormAction = function()
{
if (_spOriginalFormAction != null)
{
RestoreToOriginalFormActionCore();
document.forms[0]._initialAction =
document.forms[0].action;
}
}";
ScriptManager.RegisterStartupScript(this,
typeof(SayHelloWebPart), "UpdatePanelFixup",
fixupScript, true);
}
}
}
}

===========================================

Sorry, let out the web.config changes. This blog won't let me post up the changes, so email me and i will send it back.

Tuesday 5 February 2008

The search request was unable to connect to the Search Service

There was a SharePoint farm not returning search results. The error it returned was

"The search request was unable to connect to the Search Service"

After looking at it, it was a very simple fix. The server wasn't configure to server search queries. A simple ticking of the box in central admin and it fixed the problem. To fix this:

  • Go to Central Admin
  • Operations
  • Services on Server
  • Office SharePoint Server Search Service Setting
  • Make sure "User this server for serving search queries is ticket

Problem solved.

Another thing that could be causing it is the Account used to search might not have the right access needed or the Search services aren't running. Check that

  • Office SharePoint Server Search and
  • Windows SharePoint Services Search

Should be both running. If you're still having problems, let me know and I'll try to help you out.

Fadi...