Wednesday, July 25, 2007

Windows SharePoint Services 3.0 : Unexpected error

Today our Windows SharePoint Services 3.0 (WSS3) issued a typical Microsoft error message: "Unexpected error". That's all: it displayed no other message is and no information in the event log of the server. BIIIGGG trouble since it's used by 300+ people.

So the first thing was to unplug the LAN cable to make sure I'm the only user on the server. Next, patch the web.config file to make sure we see all error details and the stack trace. This can be done by:

Changing the line
<safemode maxcontrols="50" callstack="false"> to
<safemode maxcontrols="50" callstack="true">
And
<customerrors mode="On"> to
<customerrors mode="Off">
(found at http://www.devx.com/dotnet/Article/17518/1954?pf=true)


A CTRL+Refresh inside Internet Explorer finally displayed that WSS was issuing an AccessViolationException in SPRequest..ctor() - that is the default static constructor of that class.

The hotfix from Micosoft for AccessViolationException in KB923028 did not help, but during testing that I found out that WSS raises first an BadImageFormatException before the AccessViolationException. This means that the main cause of the problem is the BadImageFormatException
and the AccessViolationException is only because the COM wrapper of .NET seems to have a bug.


Because of COM+ errors inside event log, it turned out that SPRequest is actually a COM class (GUID {BDEADEE2-C265-11D0-BCED-00A0C90AB50F}) and that it is located inside OWSSVR.DLL. I simply copied this file from our test server that has the same version of WSS running to this server and IT WORKED.

Well, I forgot to plug the cable in again so the server was still offline for 15 more minutes but anyway…

1 comment:

  1. I have the same problem. However I don't have another machine to copy the file from. Could you sent it to me? My installation is a WWS 3. Email me @ wss3@internetwideworld.com

    ReplyDelete