I was remoting into a SharePoint 2007 (MOSS) box yesterday because I needed to update the configuration on a few of the servers in the farm. Like most production systems, the server did not have Visual Studio, so I was using Notepad to edit the configuration. As you may know, navigating through a configuration file in Notepad is a bit of pain compared to Visual Studio because it lacks the finesse of a full featured text editor. My connection was also fairly slow so it was making my configuration task more irksome than normal.
Hoping to get a bit more control, I made the switch to Wordpad. After making a couple of simple configuration changes, I refreshed the SharePoint site to make sure everything was okay. I was greeted with an error screen. Thinking that I must have made a typo, I checked over the configuration changes but didn’t see anything unusual. So I decided to start removing things until the error went away. Each time I removed a change, I refreshed the screen hoping to identify the issue. The error screen persisted.
Finally, I reverted back to the backup and the page popped back up no problem. That’s when I started thinking something was really amiss. I opened the working Web.config in Wordpad and saved the file without making any changes. The error was back.
I don’t know why, but Word pad randomly places little questions marks at various intervals throughout the Web.config. I saw no rhyme or reason to the madness, but I confirmed it on multiple Windows 2003 servers. So, if you’re configuring SharePoint, or any .NET application for that matter, on a remote machine, make sure to shy away from Wordpad because you’ll save yourself a headache.
Click on the following image to see the differences in the files: