Tag Archives: MOSS

MOSS: An Unexpected Error Has Occurred

If you’ve worked with MOSS long enough, I’m sure you’ve seen this error.  The reasons that it occurs are numerous, and may even be blamed on poor error handling / reporting by the programmers.

If you’ve come across this error, and turned <customErrors /> off in your MOSS site’s web.config and it still occurs, you may have run into the issue that I did.

This can occur right after MOSS installation, or on a farm that has been up and running for some time, and this is something quick that you can check to make sure it’s not the reason, especially if your server is managed through AD or an admin that is really tight on server security.

My instance of this error was on a completely locked down Windows Server 2008 installation.  The cause was one setting that was applied through Active Directory (AD) Group Policy Objects (GPO), Use FIPS compliant algorithms for encryption, hashing, and signing.

Continue reading MOSS: An Unexpected Error Has Occurred

CKS EBE and Automatic Detection of Trackbacks… no no… you get SPAM hell.

If you’re using CKS EBE and have a solution to this, please feel free to let me know.

The automatic detection of blogs that post to your site is a pretty nice feature of CKS EBE, however, from what I see, there is no error checking.  So if sites point to yours, you’ll eventually detect it through trackbacks, and you’ll post their spam onto your site.

If this has happened to you, the easiest solution is to create a template for the list that contains the spam (trackbacks received), delete the list that has the spam, and recreate it with the exact same name.  Hopefully you have some experience with MOSS so doing this won’t be too difficult, however if you need further instructions, let me know.

Keep in mind that following this procedure will cause all of your trackbacks received to be lost.  If this hasn’t happened to you yet, you can disable this feature under "blog settings > Receive trackbacks from other blogs".

Good luck, happy blogging, and hey… at least I was #3 for ‘orgasmoverdose’ on google for a little while. hahaha.  Damn spammers.

Run MOSS Against Multiple Active Directories

One of the great new features that MOSS introduced, was an easy way to have the same information shared between multiple portals/sites.  By extending your web applications, you can have separate authentication providers utilized to reach the same information using Forms Based Authentication (FBA).  FBA is usually associated with a custom SQL server database, or some other authentication mechanism, however you can use it to provide AD services as well.

Since implementing FBA in MOSS is pretty well documented already, I won’t go down that route, but just tell you what needs to be changed for it to work with Active Directory (AD).  If you need an article that talks about FBA specifically, try this one:
http://www.devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-1.aspx.  This article assumes you have implemented FBA already or know how to, and just need the specifics for the ADMembershipProvider.

This article also assumes that you have extended a web application to use FBA.  Though there is nothing preventing you from using this on a primary web application and not using an extended web application, I use the term ‘extended web application’ to mean the web application that you want to set up for FBA.

In the extended web application’s web.config file, change the connectionString element to:

<add name=”ADConnectionString” connectionString=LDAP://[ldapquery]/>

I placed this node between </configSections> and <SharePoint>.

The next change is to the membership node and should read:

<membership defaultProvider=”ADMembershipProvider”>
attributeMapUsername=”sAMAccountName” />

This node, I placed between <sessionState … /> and </system.web>.  Please make sure that the ‘type’ line is properly formatted XML as this post may not display properly.  Put type=”…” all on one line.

Make sure to replace [ldapquery], [accountName], and [password] with the information specific to your AD.  You can even change sAMAccountName as the attributeMapUsername to another field in your AD if that is appropriate.  Your domain administrators will be able to help you with the LDAP query if you aren’t familiar with the technology or the domain’s structure.

You’ll also need to change the nodes in the Central Administration web.config and change the authentication provider at Central Administration > Application Management > Authentication Providers (all of which you should have touched with doing a typical FBA configuration).

Infrastructure Requirements:

  • the account used above should have ‘read’ permissions on the directory (a standard user account will usually work.)
  • the appropriate firewall ports will need to be open if traveling outside of the local network – port 389 by default.

Again, this article assumes that you know what you’re doing with MOSS and FBA and just need the specifics for the AD integration.  I had a hard time finding that information at the time, so I decided to post it here.  If you have any questions, post them into comments and I’ll get them answered ASAP.

Google’s Search for AdSense and MOSS/WSS – CKS:EBE

Since starting this blog, I’ve tried to add features that I thought might be useful.  After experimenting with a few searches, I decided to go with Google’s Search for AdSense.  It seemed to be a pretty useful tool, with advertising harmlessly placed on the side of the search results page, and if someone finds an ad that they are interested in, I’d make a few pennies.

However, with the way MOSS is constructed, with ASPX pages, master pages, and the rendering and server call structure, it was not as easy as some of the other features I put on this site.  The code that Google provides to copy and paste into the page is nested inside a <FORM> tag.  With the way ASPX pages are generated, that would be nesting one <FORM> tag inside another <FORM> tag and that dog just won’t hunt.  After doing quite a bit of head banging, and a ton of searching and experimenting, I was able to come up with some javascript that I thought would post properly.  This worked out just fine in Safari, I didn’t test on Firefox, but failed miserably in IE.  In Safari, the link would redirect properly, but in IE, the page would simply post back to itself, adding the proper querystring variables, the information after the URL that sites sometimes use to determine what you’ve done on a prior page, but failing miserably to deliver the desired result.  As IE is one of the most used browsers on the Internet, this just wasn’t acceptable.  Thus began my search for content on how to do it.  I couldn’t believe I was the only one with the issue.  After some pain, I came up with the solution listed below, and even some javascript to get Google’s branding back into the text box.  I didn’t want to violate any of their terms of use. 😉

The code below is used to replace the <FORM> that Google’s code generator spit out, and behaves properly within SharePoint (sorry, no syntax highlighting or proper formatting, as I haven’t gotten around to that ‘feature’ yet):

Continue reading Google’s Search for AdSense and MOSS/WSS – CKS:EBE

IIS Can Manage Multiple Web sites on Port 80 with a single IP address

Host Headers are the answer!

YES!  IIS can manage multiple web sites on the same port (properly port 80) without having to do extraneous configuring.  This can even be done with MOSS and WSS implementations.

I’ve always considered it to be common knowledge that ‘host headers’ could be used to allow IIS to handle multiple web sites on the same IP and port.  Lately I’m finding out that some very smart people are completely unaware of this fact, so I decided to blog about it.

Configuring it for basic site usage:

– Open IIS (Start > Run > inetmgr). 

– Expand the <server> node, and expand the Web Sites node.


– Right-Click on the web site that you want to edit and choose Properties.

– On the Web Site tab in the Web site identification area, click on Advanced.

– The top area titled ‘Multiple identities for this Web site’ will allow you to add host headers, modify IP address usage within IIS, and modify the non-SSL ports.

iis02  iis04

The host header value will cause IIS to route requests that are directed to the specific host header to that specific web site.

You can and should use this to facilitate development and production deployments within IIS.  If host headers are not used, then the only other way to assign multiple sites using the same port (80) to a single web server is to assign multiple IP addresses.  There is no reason to do that.  A single IP address can be used to route your sites and to state once more, this can be used with MOSS and WSS web applications. 

For MOSS deployments, when creating a web application you can assign a host header and MOSS will configure IIS accordingly.  If your web applications are already created and you want to host them on a new port (80) using host headers, you should be able to make the changes directly within IIS to manage this.  Make sure you leave the original entries in IIS so that no URL’s break, but you should now be able to route through IIS on port 80 to your web application.  Please post any environment specific questions and I’ll answer as I can.

Hope this helps some people out.

And please note, this does not apply for SSL (HTTPS) sites.  SSL does not support multiple sites on the same port and IP address due to the way encryption and certificates are managed.

Tutorial: Creating A MOSS Development Environment Part IV – Configuring MOSS

Ok, this is the last entry in this series of tutorials for setting up a MOSS development environment.  In the prior posts, we installed SQL Server, installed MOSS, installed VS.NET and some other supporting products, and in this post, we’ll configure MOSS.  The plan for this configuration is to go through the basic farm configuration with assigning roles to our server and setting up a web application.  As an additional task, we’ll extend the web application that we create and configure it for secure (https) access.  I’ve discovered that in most deployments, clients are looking for secure websites, so it makes sense to develop on one whenever possible.

Here are the links to the prior posts in this series:

Tutorial: Creating A MOSS Development Environment Part I – SQL Server Installation
Tutorial: Creating A MOSS Development Environment Part II – MOSS Installation
Tutorial: Creating A MOSS Development Environment Part III – VS.NET Installation


There are a few things that we’ll need to do as prework for completing this tutorial.  Create the following accounts:

WssSearchService (we’ll use this account for all of SharePoint’s search functionality)
SpsContentAccess (used for the content access account for indexing)
MainAppPool (we’ll use this for the app pool account)
(will be used for the SSP application pool)
MossWebApp01 (will be used for the main web application)

Continue reading Tutorial: Creating A MOSS Development Environment Part IV – Configuring MOSS

Tutorial: Creating A MOSS Development Environment Part III – VS.NET Installation

Welcome back and onto part III of this installation guide.  This installment will document installing Visual Studio .NET 2008 and also discuss the additional software that is advised to facilitate MOSS development.

Parts one and two can be found here:

Tutorial: Creating A MOSS Development Environment Part I – SQL Server Installation
Tutorial: Creating A MOSS Development Environment Part II – MOSS Installation

If you’re following along, great, and if you’re just coming across this entry because you wanted a sample of the software to install in the environment to facilitate development, that’s great too.  I hope this entry helps.  Installing Visual Studio .NET is pretty straight forward, the only thing I do different than the standard install is change the installation path, and remove SQL Express since we installed that during step one, so before I move onto documenting that, I’ll list the software that I add to development environments.

Software to add to your MOSS Development Environments

BDC Metadata Manager
Fiddler HTTP Debugger
Internet Explorer Developer Toolbar
Lutz Roeder’s .NET Reflector
Microsoft Office 2007
SharePoint Designer
Visual Studio 2008 Extensions for Windows SharePoint Services (VSeWSS)
Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO)

From the above software list, everything is either included with your MSDN License (hopefully you have one) or available as a free download, with the exception of BDC Metadata Manager.  However for BDC Meta Man, you can download a light-weight free version of the product that will allow you demonstrate functionality.

Continue reading Tutorial: Creating A MOSS Development Environment Part III – VS.NET Installation

Tutorial: Creating A MOSS Development Environment Part II – MOSS Installation

Ok, here we go with part 2 of this tutorial.  The part where we actually do the MOSS installation.  If you missed part 1, you can find it here: Tutorial: Creating A MOSS Development Environment Part I – SQL Installation.  If you’re back after doing part 1 and are ready for part 2, "Welcome back!"  So without any further ado and hoopla, I’m just going to copy and past the Disclaimer and The Environments from part one for your perusal, and jump right into the MOSS Installation.

Continue reading Tutorial: Creating A MOSS Development Environment Part II – MOSS Installation

Tutorial: Creating A MOSS Development Environment Part I – SQL Server Installation

One of the questions I get the most is how exactly do you create a Microsoft Office SharePoint Server 2007 (MOSS) development environment and what software should be used / included.  Since I usually create a new environment for every client, I get a lot of practice at it and I thought I’d document the process.  I’ve included screenshots for every touch point in the SQL install and will do the same for the following Parts. You can click on the thumbnails to view a larger version.  I assume no prior knowledge of SQL, MOSS, or Visual Studio in these tutorials.  If anything I’ve noticed out there is most tutorials assume product familiarity.  This will help novices as well. 🙂

Continue reading Tutorial: Creating A MOSS Development Environment Part I – SQL Server Installation

AntiVirus Blocking Woes for Infrastructure Changes

I’m not sure if I’m the only one out there that doesn’t know this, especially since I’m an app dev guy and not an infrastructure guy (though you may not be able to tell by my posts so far), but AntiVirus engines can really ruin your day when you’re attempting to troubleshoot things, or install enterprise software.

Recently, I installed Microsoft Exchange 2007 and had all kinds of trouble.  Needless to say that the antivirus client that was running on the domain controller was preventing remote updates to the sysvol folder.  Now you’d figure that I could manually correct the issues after disabling the blocking rule on the DC, but no… I had to uninstall Exchange and reinstall it.  By the way, when you uninstall exchange, while planning to reinstall it, make sure that it cleans up Active Directory properly or the installer will never get started.

To add insult to injury, I couldn’t figure out why my Exchange install could receive emails, but was failing to send them out.  Again, turns out that they AntiVirus client was blocking all outbound port 25 traffic.  Again after adjusting the policy of the AV client, yes… success.

Within the next 24 hours I began troubleshooting why my SharePoint boxes could not send out smtp mail via the Exchange server.  I had already created a new receive connector and configured it properly.  After a short time of chasing my tail, I remembered that all of these servers were built from the same sysprep image.  All running the same AV client, and yes, the port blocking rule was still engaged on the SharePoint box.

Just as a reminder to anyone that reads this, and myself especially… Make sure to check all traffic failures first with your various AntiVirus engines.  They are very thorough and a thoroughly locked down server is going to likely need some reconfiguring prior to retasking or deployment.