Tuesday, September 25, 2007
[SPS2003/WSSv2] Service Pack 3 released
Microsoft Windows SharePoint Services Service Pack 3 (SP3) contains stability improvements and performance improvements. Some fixes that are included with Windows SharePoint Services SP3 were previously released in separate updates. Windows SharePoint Services SP3 combines the previously released fixes into one update.
Microsoft Office SharePoint Portal Server 2003 Service Pack 3 (SP3) contains significant security improvements. Some fixes that are included in SharePoint Portal Server 2003 SP3 were previously released as separate updates. This service pack combines these updates into one update.
Wednesday, September 12, 2007
List columns in SPS2003/WSSv2 and MOSS2007/WSSv3
Lists in Windows SharePoint Services can only contain a certain number of fields or columns. If a list in your site contains too many fields or columns, it are not migrated. You must manually re-create the list. Note that this includes surveys. The maximum numbers for fields and columns are:
- 64 text fields, including the following field types: Single line of text, Choice, Hyperlink, or Picture.
- 16 Lookup fields
- 16 Date and Time fields
- 16 Yes/No fields
- 32 Number and Currency fields
- 32 Multiple lines of text fields
In MOSS2007/WSSv3 these limitations are gone. The only limitations is the performance of your list: Sharepoint 2007 - Column Limits
[SPS2003] Issue with "Add link to site" option
A colleague of mine ran into an issue with the ‘Add link to site’ option in Site Creation. After clicking the OK button nothing happens. This issue is being discussed in newsgroeps and possibly being caused by hotfix: KB933854
Someone created a solution for this issue, by changing some code in the newform.aspx file. After applying this solution, the issue was solved. More info can be found at: SPS2003 Add Link to Site not working
Changes to newform.aspx:
1. Open this file in a text editor:
C:\Program Files\Common Files\Microsoft Shared\web server
extensions\60\TEMPLATE\[LCID]\SPSSITES\LISTS\SITESLST\NewForm.aspx
(Replace [LCID] with your locale identifier, 1033 for English)
2. Find this code fragment:
<SPSWC:InputFormButtonAtBottom ID="ButtonOk" runat="server"
TextLocId="Page_OkButton_Text"/>
<SPSWC:InputFormButtonAtBottom ID="ButtonCancel" runat="server"
TextLocId="Page_CancelButton_Text" visible="false" />
</SPSWC:InputFormButtonSection>
3. Replace it with this code fragment:
<!-- Workaround for WIN2003SP2 issue: http://support.microsoft.com/kb/934229
-->
<input type="button" value=" OK "
onclick="document.forms[0].submit()" />
<!-- <SPSWC:InputFormButtonAtBottom ID="ButtonOk" runat="server"
TextLocId="Page_OkButton_Text"/> -->
<!-- End workaround -->
<SPSWC:InputFormButtonAtBottom ID="ButtonCancel" runat="server"
TextLocId="Page_CancelButton_Text" visible="false" />
</SPSWC:InputFormButtonSection>
4. That's it!!
Tuesday, July 03, 2007
Add SharePoint sites to "My Network Places"
On a forum I found a solution for this issue. A guy named DonQ created a vbs script which I used in my logon script. Depending on group memberships, SharePoint sites are automatically created for the users while logging in.
The script I used as a starting point is:
'This is a fix to the original, which I found did not handle URLs
'longer than 44 characters.
Option Explicit
Sub CreateNetworkFolder(siteURL, siteName)
Dim iRes, jRes, MT, TT
Dim SH, newPath
Dim objFso, f, fs, g
Dim bString
Dim ltrIndex
Dim nameLength, urlLength, urlCutoff
Dim aFile
'ForWriting (2) is the attribute to be set when writing to a file.
Const ForWriting = 2
nameLength = Len(siteName)
urlLength = Len(siteURL)
'44 seems to be the length where we have to change a 00 to a 01.
urlCutoff = 44
MT = "OK to create a My Network Places " & vbCr & "folder for " & siteURL &amp;amp;amp;amp;amp;amp; vbCr & "named " & siteName & "?"
TT = "My Network Places"
iRes = MsgBox(MT, vbOKCancel + vbInformation, TT )
Set objFso = CreateObject("Scripting.FileSystemObject")
If iRes = vbCancel Then
WScript.Quit
End If
Set SH = WScript.CreateObject("WScript.Shell")
'Create the folder under NetHood that will hold the target.lnk file
newPath = SH.SpecialFolders("NetHood") & "\" & siteName
If (objFso.FolderExists(newPath)) Then
WScript.Echo "A Network Place with that name already exists."
WScript.Quit
End If
objFso.CreateFolder(newPath)
'We ceate a Desktop.ini file
Set fs = CreateObject("Scripting.FileSystemObject")
aFile = newPath & "\Desktop.ini"
Set f = fs.OpenTextFile( aFile, ForWriting, True )
'Write the data lines that will make this a folder shortcut.
f.WriteLine "[.ShellClassInfo]"
f.WriteLine "CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}"
f.WriteLine "Flags=2"
f.WriteLine "ConfirmFileOp=0"
f.Close
'We make Desktop.ini a system-hidden file by assigning it attribute of 6
Set fs = CreateObject("Scripting.FileSystemObject")
Set g = fs.GetFile(newPath & "\Desktop.ini")
g.Attributes = 6
'We make the folder read-only by assigning it 1.
Set fs = CreateObject("Scripting.FileSystemObject")
Set g = fs.GetFolder(newPath)
g.Attributes = 1
'This is where we construct the target.lnk file byte by byte. Most of the lines are shown in 16 byte chunks,
'mostly because that is the way I saw it in the Debug utility I was using to inspect shortcut files.
'Line 1, 16 bytes
bString = Chr(&amp;amp;amp;amp;amp;amp;H4C) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H01) & Chr(&H14) & Chr(&H02) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&HC0) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'Line 2, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H46) & Chr(&H81) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'Line 3, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'Line 4., 16 bytes. 13th byte is significant.
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H01) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'Line 5. 13th byte is significant.
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'When I was analyzing the next byte of shortcuts I created, I found that it is set to various values,
'and I have no idea what they are referring to. In desperation I tried substituting some values.
'00 caused a crash of Explorer. FF seeems to work fine for all.
'If anyone can get back to me on what this byte is or why FF works, please contact me.
bString = bString & Chr(&HFF)
'This byte is 00 if the URL is 44 characters or less, 01 if greater.
If urlLength > urlCutoff Then
bString = bString & Chr(&H01)
Else
bString = bString & Chr(&H00)
End If
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H14) & Chr(&H00)
'Line 6, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H1F) & Chr(&H50) & Chr(&HE0) & Chr(&H4F) & Chr(&HD0) & Chr(&H20) & Chr(&HEA) & Chr(&H3A) & Chr(&H69) & Chr(&H10) & Chr(&HA2) & Chr(&HD8) & Chr(&H08) & Chr(&H00) & Chr(&H2B) & Chr(&H30)
'Line 7, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H30) & Chr(&H9D) & Chr(&H14) & Chr(&H00) & Chr(&H2E) & Chr(&H00) & Chr(&H00) & Chr(&HDF) & Chr(&HEA) & Chr(&HBD) & Chr(&H65) & Chr(&HC2) & Chr(&HD0) & Chr(&H11) & Chr(&HBC) & Chr(&HED)
'Line 8, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&HA0) & Chr(&HC9) & Chr(&H0A) & Chr(&HB5) & Chr(&H0F) & Chr(&HA4)
'This byte is 00 if the URL is 44 characters or less, 01 if greater.
If urlLength > urlCutoff Then
bString = bString & Chr(&H01)
Else
bString = bString & Chr(&H00)
End If
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H4C) & Chr(&H50) & Chr(&H00) & Chr(&H01) & Chr(&H42) & Chr(&H57) & Chr(&H00) & Chr(&H00)
'Line 9, 16 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H10) & Chr(&H00)
'Line 10, 2 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00)
'The next byte represents the length of the site name.
bString = bString & Chr(nameLength)
'Take the site name, and write each letter, preceeded by a "00" character.
For ltrIndex = 1 to nameLength
bString = bString &amp;amp;amp;amp;amp;amp; Chr(&H00) & Mid(siteName, ltrIndex, 1)
Next
'Middle line, separates the Folder Name from the URL. 3 bytes.
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00)
'The next byte represents the length of the site URL.
bString = bString & Chr(urlLength)
'Take the site URL, and write each letter, preceeded by a "00" character.
For ltrIndex = 1 to urlLength
bString = bString &amp;amp;amp;amp;amp;amp; Chr(&H00) & Mid(siteURL, ltrIndex, 1)
Next
'Last line, 13 bytes
bString = bString & Chr(&amp;amp;amp;amp;amp;amp;H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&H00)
'Let's create the target.lnk file.
Set fs = CreateObject("Scripting.FileSystemObject")
aFile = newPath & "\target.lnk"
'aFile = newPath & "\vb.sss"
Set f = fs.OpenTextFile(aFile, ForWriting, True)
f.Write bString
f.Close
MT = siteName & " created."
jRes = MsgBox(MT, vbOK, TT )
End Sub
CreateNetworkFolder "http://ReallyReallyLongURL.com/big_long_subfolder/", "Really, Really Long"
Source:
http://totheescrime.org/FolderShortcut/fs.txt
http://www.codecomments.com/archive300-2005-4-452832.html
Wednesday, January 17, 2007
[SPS2003] Requesting userdetails from list item
On an environment of a customer, a "Page cannot be displayed" error message is displayed when clicking this item. After some troubleshooting and reading through the IIS log, the cause of this issue is the following:
The link of the page that displays the user details is http://<servername>/sites/<sitename>/_layouts/1033/UserDisp.aspx?ID=<id>. This aspx file requests the aspx PortalAPI.aspx. The PortalAPI request the "Up To Link" URL and tries to contact the configured portal. In our case it turned out that users configured the Up To Link to a team site instead of the portal. Therefore the PortalAPI tries to generate a non existing URL, causing the Page cannot be displayed error.
So if you run into the same issue: First check if the Up To Link is really a portal!!
Thursday, April 13, 2006
Restore via SPSBackup might fail when back-end is running SQL 2005
In the log which has been created in the Program Files\Sharepoint Portal Server\Logs directory the following is logged:
00012E8C CRI 00000000 00000E5C Connecting to SQL Server <servername> ...
00012ED2 CRI 00000000 00000E5C Connected to SQL Server <servername>
00012ED2 CRI 00000000 00000E5C Connected To Server
00012ED2 CRI 00000000 00000E5C Entering RestoreDB for database <portalname>1_SITE ...
00012ED2 CRI 00000000 00000E5C Entered Critical Section in RestoreDB for database <portalname>1_SITE ...
00012ED2 CRI 00000000 00000E5C Left Critical Section in RestoreDB for database <portalname>1_SITE ...
00012FCC UNK 00000000 000007F8 Overall % Completed: 0%
00013008 CRI 80045510 00000E5C GetDatabaseByName Failed. Trying to obtain path from master database.
0001313F CRI 00000000 00000E5C Command Text sent to SQL is: RESTORE DATABASE [<portalname>1_SITE] FROM DISK = N'\\backup\bk-<servername>-<portalname>1_SITE.SPB' WITH FILE = 1, NOUNLOAD , STATS = 5, RECOVERY , REPLACE , MOVE N'<portalname>1_SITE' TO N'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Data.MDF', MOVE N'<portalname>1_SITE_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Log.LDF', MOVE N'sysft_ix_<portalname>1_SITE' TO N'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Data.MDF'
0001313F CRI 00000000 00000E5C Database <portalname>1_SITE does not exist, proceeding to restore it.
0001313F CRI 00000000 00000E5C Restoring database <portalname>1_SITE ...
000131A3 CRI 80040C68 00000E5C Failed to restore the database.
000131A3 UNK 00000000 00000E5C No error information available
000131A3 UNK 00000000 00000E5C No error information available
000131A3 UNK 00000000 00000E5C Exception in BackupSQL: Source=SQLBkMgd, Message=The operation failed on server <servername>. For more information, see the Microsoft Windows Event Log on that server.
000131A3 UNK 00000000 00000E5C BackupSQL Thread setting its status to completed and exiting
After copying and pasting the query into the SQL Management Studio, SQL returns the following error:
Msg 3176, Level 16, State 1, Line 1
File 'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Data.MDF' is claimed by 'sysft_ix_<portalname>1_SITE'(65537) and '<portalname>1_SITE'(1). The WITH MOVE clause can be used to relocate one or more files.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
The above information indicates that two parameters of the query point to the same name. Investigation of the query turns out that this is the case. Both the SITE database as the index are being restored to the same MDF file:
MOVE N'<portalname>1_SITE' TO N'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Data.MDF',
MOVE N'sysft_ix_<portalname>1_SITE' TO N'C:\Program Files\Microsoft SQL Server\MSSQL\data\<portalname>1_SITE_Data.MDF'
The solution to this problem is installing the hotfix KB914445. Unfortunatelly this hotfix cannot be downloaded from the Microsoft site, so you have to call Microsoft to ask them to send it to you by email. Or if you have access to the Premier site, download it there.
"Restore operation is not completed successfully when you use the SharePoint Portal Server Backup and Restore tool (Spsbackup.exe) to restore a portal site from backup
You use the SharePoint Portal Server Backup and Restore tool to back up the portal site. However, when you try to restore the portal site from backup, the operation is not completed successfully. This problem occurs if the following conditions are true:
In this situation, the restore operation is not completed successfully because of a file naming conflict that occurs in SharePoint Portal Server 2003."
[UPDATE] The mentioned hotfix has been included in the SharePoint Portal Server 2003 post-Service Pack 2 hotfix package: June 16, 2006 (KB919175)