Problem:
After applying Infrastructure Update for Windows SharePoint Services 3.0 (KB951695) and Infrastructure Update for Microsoft Office Servers (KB951297) and trying to run the SharePoint Products and Technologies Configuration Wizard, the wizard stops on task 8 of 9 and gives error message:
An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown. Additional exception information: Failed to upgrade SharePoint Products and Technologies.
How to start solving:
Looking at the log provided below the error message leads you to PSCDiagnostics file, but that file doesn't really contain any good error messages. However, it mentions that you should look at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\Upgrade.log for further information regarding the failure.
Looking at Upgrade.log tells us what the problem is.
Error 1:
The access control list on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\template\layouts\web.config could not be modified because the path could not be located in the file system.
Solution 1:
Trying to locate the web.config file quickly reveals the real cause of the problem: there is no such file in that folder. Reasons for that are (again) unknown at least to me, but copying that file from another SharePoint 2007 installation to the correct folder and restarting the Configuration Wizard should get you around this issue.
If the file exists, you may want to verify that the syntax of web.config is valid.
NOTE! There are several other possibilities for PostSetupConfigurationTaskException, so please post your errors and solutions here and I keep updating the article. Thanks!
August 28, 2008
August 7, 2008
MOSS: Using Session_OnStart
Problem:
Want to do something in Session_OnStart event in your MOSS web application? Modifying global.asax doesn't have any effect? Getting frustrated?
Solution:
No worries, just create HttpModule like in the following example. In my code I'm creating a "WWW" cookie that is required by Load Balancer and setting cookie value from an appSettings key in web.config.
---
class NLBModule : IHttpModule
{
#region IHttpModule Members
public void Dispose()
{}
public void Init(HttpApplication context)
{
SessionStateModule sessionModule = (SessionStateModule)context.Modules["Session"];
sessionModule.Start += delegate(object sender, EventArgs e) { sessionModule_Start(sender, e, context); };
}
#endregion
void sessionModule_Start(object sender, EventArgs e, HttpApplication context)
{
context.Response.Cookies.Add(new HttpCookie("WWW", ConfigurationManager.AppSettings["NLB_ID"]));
}
}
---
Finally register the HttpModule in web.config like this:
<system.web>
<httpModules>
<add name="NLBModule" type="MyProject.HttpHandlers.NLBModule, MyProject.HttpHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XYZ" />
</httpModules>
</system.web>
Want to do something in Session_OnStart event in your MOSS web application? Modifying global.asax doesn't have any effect? Getting frustrated?
Solution:
No worries, just create HttpModule like in the following example. In my code I'm creating a "WWW" cookie that is required by Load Balancer and setting cookie value from an appSettings key in web.config.
---
class NLBModule : IHttpModule
{
#region IHttpModule Members
public void Dispose()
{}
public void Init(HttpApplication context)
{
SessionStateModule sessionModule = (SessionStateModule)context.Modules["Session"];
sessionModule.Start += delegate(object sender, EventArgs e) { sessionModule_Start(sender, e, context); };
}
#endregion
void sessionModule_Start(object sender, EventArgs e, HttpApplication context)
{
context.Response.Cookies.Add(new HttpCookie("WWW", ConfigurationManager.AppSettings["NLB_ID"]));
}
}
---
Finally register the HttpModule in web.config like this:
<system.web>
<httpModules>
<add name="NLBModule" type="MyProject.HttpHandlers.NLBModule, MyProject.HttpHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XYZ" />
</httpModules>
</system.web>
Subscribe to:
Posts (Atom)