Archive for the ‘Sharepoint 2007 ( MOSS / WSS )’ Category

MOSS 2007 & Windows Server 2003 SP2

Friday, September 14th, 2007

We recently upgraded one of our SharePoint boxes to Service Pack 2 of Windows Server 2003. The upgrade broke our Content Deployment from the upgraded server to any other servers. The error message in Central Admin said something to the tune of “The remote web upload request failed”

Upon further investigation I found out from the IIS logs on the target machine that all the exported .cab files were actually being transferred over successfully and IIS was returning back a status code of 200 for each transfer. However on the last CAB file upload, IIS returned a status code of 400 every time for some reason. After that, everything just died out and the source machine could not confirm that the transfer was complete.

Rob has a more detailed account of why SP2 broke Content Deployment but in short, the fix involved making changes to the registry since service pack 2 has issues with networking and I am being told that there is no way to roll-back from SP2.

SharePoint Alerts

Friday, September 14th, 2007

SharePoint 2007 has really nice looking alerts that you can configure from the site itself. For example, you can subscribe to a discussion board by clicking “Actions > Alert Me” and you will start receiving alerts if and when there are changes on that discussion board.

However, if you want to make changes to how the alert email looks - perhaps to make the email look more like your corporate emails - you have to modify a file called alerttemplates.xml located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML. Combined-Knowledge has a great white-paper on how to do so.

However, I just wasted a bit of my time figuring out why my changes were not taking effect. It turns out that after making changes to your alert template, you must use the stsadm -o updatealerttemplates to update the alert template for the site collection you want. Then you MUST re-subscribe yourself to receive the alert by clicking “Actions > Alert Me

It appears that the site creates a separate alert template for each user. Seems inefficient if it is true - can someone confirm this?

Cannot use SharePoint to send an email to a list or library

Wednesday, August 22nd, 2007

MOSS 2007 allows for the ability to send emails (incoming email) to Document Libraries and Discussion lists etc., so that content is automatically populated in these lists and libraries.

Sharepoint also allows the ability to send out emails (outgoing email) for things such as Content Deployment jobs.

We put 2 & 2 together and thought - “Why don’t we setup a list called ‘Alerts’ that will receive daily emails from our Content Deployment job? That way whoever wants to receive these can setup an ‘Alert’ on the Alerts list”. It was an excellent idea except for the fact that it DIDN’T work!

After a bit of snooping around it turns out that Sharepoint doesn’t like receiving email from itself! Here is the email that was dropped into the SMTP drop folder and was picked up by the timer service-

   1: x-sender: ALERTS@computer.domain
   2: x-receiver: ALERTS@computer.domain
   3: Received: from computer ([127.0.0.1]) by computer.domain with Microsoft SMTPSVC(6.0.3790.1830);
   4:      Wed, 22 Aug 2007 17:50:37 -0400
   5: Date: 22 Aug 2007 17:50:37 -0400
   6: From: <ALERTS@computer.domain>
   7: To: <ALERTS@computer.domain>
   8: Content-Transfer-Encoding: 8bit
   9: Content-Type: text/html; charset=utf-8
  10: Subject: JOB FAILED: Content deployment job ‘INCREMENTAL deploy’ started at 8/22/2007 5:50:31 PM
  11: MIME-Version: 1.0
  12: X-Mailer: Windows SharePoint Services (version 3)
  13: Return-Path: ALERTS@computer.domain
  14: Message-ID: <computerXvpFVjCR00000005@computer.domain>
  15: X-OriginalArrivalTime: 22 Aug 2007 21:50:37.0488 (UTC) FILETIME=[79882B00:01C7E506]
  16:  
  17: The content deployment job ‘INCREMENTAL deploy’ on path ‘Dev to Production’ failed. A detailed report is available at: <a href=”http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483″ >http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483</a>

Notice on Line 12 that the X-Mailer is “Windows SharePoint Services (version 3)”. This email was REJECTED after being picked up

So I replaced the X-Mailer header with Outlook Express’s X-Mailer header-

   1: x-sender: ALERTS@computer.domain
   2: x-receiver: ALERTS@computer.domain
   3: Received: from computer ([127.0.0.1]) by computer.domain with Microsoft SMTPSVC(6.0.3790.1830);
   4:      Wed, 22 Aug 2007 17:50:37 -0400
   5: Date: 22 Aug 2007 17:50:37 -0400
   6: From: <ALERTS@computer.domain>
   7: To: <ALERTS@computer.domain>
   8: Content-Transfer-Encoding: 8bit
   9: Content-Type: text/html; charset=utf-8
  10: Subject: JOB FAILED: Content deployment job ‘INCREMENTAL deploy’ started at 8/22/2007 5:50:31 PM
  11: MIME-Version: 1.0
  12: X-Mailer: Microsoft Outlook Express 6.00.3790.2929
  13: Return-Path: ALERTS@computer.domain
  14: Message-ID: <computerXvpFVjCR00000005@computer.domain>
  15: X-OriginalArrivalTime: 22 Aug 2007 21:50:37.0488 (UTC) FILETIME=[79882B00:01C7E506]
  16:  
  17: The content deployment job ‘INCREMENTAL deploy’ on path ‘Dev to Production’ failed. A detailed report is available at: <a href=”http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483″ >http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483</a>

And Lo and Behold, this email was picked up and processed and it showed up in my Alerts list!

I’m not sure if this is a bug or not because one can imagine a scenario where an alert for a list goes out to the same email address as the incoming email address for the list. The developers were probably trying to prevent an infinite loop in such a scenario. However, that means that even for all legit purposes, you CANNOT HAVE SHAREPOINT EMAIL ITSELF.

Office Authentication Prompt in Vista for Sharepoint Documents

Monday, August 13th, 2007

There is an issue in Vista where a user tries to open a document from a document library in Sharepoint and they are prompted by Office to authenticate themselves. This would be acceptable behavior if the user weren’t already authenticated on the MOSS site they were browsing.

For some reason, when XP users try to open the same document from Sharepoint, they DO NOT get prompted for authentication. This is a Vista only issue. I’ve stumbled across many newsgroup posts that claim that this issue has something to do with the “Protected Mode” in IE7. Their recommended solution is to add the Sharepoint site to Trusted Sites in Internet Explorer 7 and to disable “Protected Mode”.

However, even after adding the site to trusted sites in IE and disabling protected mode, the issue still persists. The issue is only replicable after a fresh reboot - once a user authenticates in office, those credentials are cached for future use. Due to this caching in office, many people cannot pinpoint how to replicate this issue.

SOLUTION 1

The First SOLUTION to this issue is to DISABLE the WebClient service in Vista. Here is a quick script that accomplishes this: VistaMossOfficeMossSSOFix.bat Here is the code for those who’d like to incorporate this script into their environment:

net stop “WebClient”
WMIC SERVICE WHERE Caption=“WebClient” CALL ChangeStartMode “Disabled”

SOLUTION 2

There is also a second workaround that involves tricking IE to use a fake proxy and to have IE bypass the fake proxy for everything - this workaround is PREFERRED since the first Solutions ends up severing some of the nicer integration features between Office and MOSS (such as the ability to save directly from office on to a sharepoint document library)

In Internet Options, click the “Connections” tab and then click “LAN Settings”:

image 

Click “Advanced” and enter * as an exception to the proxy:

image 

Conclusion

In conclusion, the SECOND SOLUTION seems to be more appropriate as the first one tends to do more harm than good.

Using batch files to do daily backups

Thursday, August 9th, 2007

Often times there are situations where you want to use batch files that run on a continuous basis but are aware of the date that they are running on.

Let me illustrate by using as example. Let’s say that I want to backup a critical executable file on a daily basis by simply using the copy command in DOS but I want the backup filename to reflect today’s date. If today was 08/09/2007, i want my target filename to be backup20070809.exe

In order to accomplish that with a batch file, use the following code-

date /t > temp.txt
set /p date= < temp.txt
del temp.txt

echo %date:~4,2%
echo %date:~7,2%
echo %date:~10,4%

The last three lines can be taken out and you can use the code from the last 3 lines to perform your backup operation

Removing Broken or Closed WebParts from a Page in Sharepoint

Friday, August 3rd, 2007

There are many instances where a wepart breaks a MOSS page. It could be a custom webpart that you dropped on the page or it could be that you are trying to deploy the site in a new environment. Whatever the reason is, it is helpful to be able to remove broken webparts from a page.

In order to see the Webparts maintenance section of any page, simple add “contents=1″ as a parameter in the query string in your address bar. For example, if your broken page is at the following URL: http://mysite/mypage.aspx then in the addressbar type http://mysite/mypage.aspx?contents=1

Ever wondered what happens when you “close” a webpart? It doesn’t get deleted but rather sits on the page in a hidden state. This trick will let you remove any closed webparts that you don’t want anymore.

SSL (HTTPS) in MOSS

Tuesday, July 31st, 2007

If you have setup your Sharepoint site and it works perfectly but now you want to switch to SSL, keep in mind that not only do you need to make changes to IIS but you also need to add an Alternate Access Mapping from Central Admin for the https://mysharepointsite link.