Monday, January 24, 2011

Changing Links List In SharePoint 2007 To Open In New Browser Window

I was recently looking for the easiest way to modify the links list in SharePoint 2007 to open the links in a new window.  In my case, every link in a links list points to an external site, so they should all be opening a new browser window.

There were a couple custom features I found, but most required modifying (or replacing) the existing links lists, something that I did not want to do.  Anyway, here's how to make the change (note:  I modified the original files, this probably isn't a best practice, and the changes could be lost by updates from Microsoft).

First, open the schema file for the links list feature.  In my case, it was located at:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\LinksList\Links\schema.xml

In this file there should be two instances of the following:

<Column Name="URL" HTMLEncode="TRUE" /><HTML><![CDATA[">]]></HTML>

Replace them both with this:

<Column Name="URL" HTMLEncode="TRUE" /><HTML><![CDATA[" target="_blank">]]></HTML>

Then restart IIS (or just the application's worker process), and now all the links in your links lists should open a new browser window!

Full Width Rich Text Editor

It can be a little frustrating in SharePoint when the "Rich Text Editor" on the edit page of Wiki's, Blogs, or on certain lists is set to fixed column width.  I certainly find it easier to blog in a fullscreen-width editor!

Here's the CSS to make it happen (warning, this syntax applies to ALL rich text editors!).   The first does all normal forms and wikis:

#onetIDListForm, #onetIDListForm .ms-formbody, #onetIDListForm iframe[title="Rich Text Editor"]{
width:100% !important;
}

And this does the same for Blogs!

.ms-formbody span span div iframe, .ms-formbody span span table.ms-long{
width:100%; text-align:left;
}
Hope this helps.

Wednesday, January 5, 2011

How to change mapping to FQDN in Sharepoint

 

FQDN = Fully Qualified Domain Name

When you install Sharepoint Services (WSS) 3.0 or Sharpoint Portal Server (MOSS) 2007, by default, the website would have address like http://[servername], even if your fqdn is servername.microsoft.com. So what happens is, it's possible not being able to access the Sharepoint Site from the Intranet when you type http://[ServerName].microsoft.com because the site is not mapped to FQDN.

It took me while to find out how to change this but here it is.

  • Go to Central Administration of your Sharepoint site on the server (NOT FROM REMOTE Machine), e.g http://localhost:1234 (whatever is the port for your Central Administration website). If you don't know what it is, look under IIS. Remember, you have to be an Admin to be able to do this.
  • Click on the "Operations" tab from top left corner.
  • Select "Alternate access mappings" under "Global Configuration" block.
  • Select your website (usually http://servername) in the Internal URL from the list.
  • Now simple change your value for URL protocol, host and port Textbox (now it should be http://servername.microsoft.com and click Ok. That's it! You may have to restart the IIS.

Friday, December 3, 2010

Event ID: 5553 & Event ID: 7888

 

Here is an issue that I came across that might be helpful for others. We were seeing these 2 errors recurring every hour in the application logs.
The synchronization runs every hour by default to ensure that the content database will be included in membership and profile information.
The most likely cause is a content database was moved, copied and used in same farm without being detached properly.
To avoid this situation always remember to run this command before moving content database:
stsadm -o preparetomove -contentDB database_server:database_name
This operation will allow the membership and profile synchronization to be included when you reattach the content database. If this is skipped it will result in static membership and profile information within the content database, preventing it from getting synchronized when it’s reattached.
//-----------------------------------------------------------------
Event Type: Error
Event Source: Office SharePoint Server
Event Category: User Profiles
Event ID: 5553
Date: 9/26/2007
Time: 4:01:02 PM
User: N/A
Computer: WEBSTER
Description:
failure trying to synch site a7b12d90-7d1d-4341-8df3-a1d92eba7a47 for ContentDB db7fb0d6-7d0d-4230-8de5-e7cc00ca0db7 WebApp 55de867d-5a9d-4ac4-83d6-f3ee9ee98df2. Exception message was Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated..
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
//----------------------------------------------------------------
Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server General
Event ID: 7888
Date: 9/26/2007
Time: 4:01:02 PM
User: N/A
Computer: WEBSTER
Description:
A runtime exception was detected. Details follow.
Message: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
Techinal Details:
System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning (TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader (SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery (DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery (SqlCommand command)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery (SqlCommand cmd, Boolean throwOnFail)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery (SqlCommand cmd)
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.WriteChangeLogConsumed()
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.Synch()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter (Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
//-----------------------------------------
Probable cause is due to backing up our current content DB and restoring it to a different application on the same farm.
What happened is the GUID for the content DB is the same causing a conflict during the sync process.
Following steps are a workaround the issue:
Get a list of the content databases GUIDs that are being affected.
Stsadm -o sync -listolddatabases 0
Now run a Select Query on the Config Databases “dbo.Objects” table and look for the GUID that matches the listed GUID.
Database: Sharepoint_Config, Table dbo.Objects
SELECT Id, ClassId, ParentId, Name, Status, Version, Properties
FROM Objects
WHERE (Id = '5bafe2af-48a7-4043-a36d-29160f3b88e2')
In our case this is just a development/testing site that will not be around for long so we just excluded it from the sync process.
Stsadm –o sync –ExcludeWebApps URL of webapplist
But for those that are not as fortunate as us you will want to do a full detach and rebuild of the content database. This will enable the Content Database to get new GUID and be included in the sync process.
Detach Content Database. This will not delete your database only break the association.
stsadm -o preparetomove -contentdb -ContentDB SQLserver:DB_NAME -site http://website
stsadm -o deletecontentdb -url http://website -databaseserver SQLserver -databasename DB_NAME
Reattach Content Database.
stsadm -o addcontentdb -url http://website -databasename DB_NAME -databaseserver SQLserver
Helpful "sysadm –o sync" options can be found here.

Thursday, August 26, 2010

Convert a Sub-site to a Site Collection

REM Create a test web for exporting
stsadm -o createweb -url "http://intranet/testweb" -sitetemplate "SPSTOPIC#0"

REM Export the test web to the filesystem
stsadm -o export -url "http://intranet/testweb" -filename "c:\testweb" -includeusersecurity -versions 4 -nofilecompression -quiet

REM Create a managed path for the new top level site
stsadm -o addpath -url "http://intranet/testsite" -type explicitinclusion

REM Create an empty site with a default site template (note that if you don't specify a template you have to manually activate the required features)
stsadm -o createsite -url "http://intranet/testsite" -owneremail "someone@example.com" -ownerlogin "domain\username" -sitetemplate "SPSTOPIC#0"

REM Import the site
stsadm -o import -url "http://intranet/testsite" -filename "c:\testweb" -includeusersecurity -nofilecompression -quiet

Thursday, July 29, 2010

HOW TO: Implementing a Backup Strategy with OOB STSADM commands

 
STSADM Backup Syntax:
For site collection backup

stsadm -o backup

-url<URL name>

-filename<file name>

[-overwrite]

Things to look out for when using STSADM to perform backups

As your site grows, logically does your content databases, and if you are employing STSADM as the tool for backup, a bi-product of that will be “longer backup times”. If your environment will be taking longer to backup, your risk of someone updating a file/document/asset as you are performing your backup increases; as a result if a backup is in running and a file is open, that backup is at risk of failure. How do we combat that problem? We use yet another STSADM command to lock the Site in effect the database to read-only; we do this with the SiteLock command, there are two in particular, getsitelock and setsitelock see below for the full command syntax.

stsadm -o getsitelock

-url <URL of Site Collection>

stsadm -o setsitelock

-url < URL of Site Collection> -lock readonly

Automate your Backup Solution

Certainly you can navigate to the SharePoint 12-Hive and execute these commands as a single action; however, a more consistent action is to script the job with error handling and user feedback.

Script your Backup

@echo off
@echo——————————————————–
@echo This script will backup your site: [Your Site Name Here]
@echo——————————————————–
cd \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
@echo locking site collection before the backup process starts
@echo off

stsadm -o getsitelock -url http://YourSiteCollectionNameHere
stsadm -o setsitelock -url http://YourSiteCollectionNameHere  -lock readonly
@echo site collection is now locked

@Echo Logic to create a new file name daily 
@For /F "tokens=1,2,3 delims=/ " %%A in (‘Date /t’) do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
Set All=%%C%%B%%A
)

@echo off

stsadm -o backup -url http://YourSiteCollectionNameHere  -filename \\ServerName\ShareName\Backup_ %All%.bak -overwrite
@echo backup completed
@echo off
stsadm -o setsitelock -url http://YourSiteCollectionNameHere  -lock none
@echo Site lock removed

Save the above to a .bat file in a preferred location.

Automate your Backup

Create a new Windows Scheduled Task by going to Start–> Control Panel –> Scheduled Tasks –> Add Scheduled Task

Follow the wizard and schedule the .bat file created above to run at a frequency of your own choosing.

How to Build a SharePoint Development Machine

 

There are two choices: You can build a SharePoint server that contains all your developer tools too. Or you can build your SharePoint server in a virtual machine (VM or VPC), and keep all your developer tools local. Then you can treat your virtual machine just like a physical server, and surf or demo it just as you would a production environment. This way you avoid all the inconsistencies that come with running browser session on locked-down web servers, don’t fill your server’s GAC with quite as much junk, and really get the client experience. You can use this post as a starting point to build either.

This post describes the tools you will use. There are always others, so go ahead and tell me about yours in the comments section. I’ve left off CSS and XML editors because frankly the best aren’t free. Even though a few items listed here are commercial products (e.g. Visual Studio), all have evaluation versions that last long enough for you to learn the ropes and prepare for that first big SharePoint interview.

Client Hardware

The biggest controllable factors on the speed of your SharePoint development environment are RAM and hard drive speed. If you do a lot of development, you will also want a lot of storage space to hold all those virtual machines.

The configuration described here is intended for a good laptop, which today is limited to 4Gb RAM. If you have 4Gb, give the virtual machine 2Gb. If you have 3Gb, give the virtual machine either 1.5Gb or 2Gb. If you have 2Gb or less, buy more RAM or host your virtual server elsewhere. Seriously.

If you need Exchange Server for any reason (1 to 2Gb recommended), you’ve grown out of laptop labs and should build this on a Virtual Server (or VMWare) host if you want some hair left over when you’re done. To build medium or large farms in a virtual environment, Virtual Server running on a 64-bit Windows 2003 Server R2 machine will remove your memory limitations. A 64-bit Vista machine provides the same expandability with Virtual PC or VMWare.

There are several factors to hard drive speed: keeping your VM on a different drive than your OS, drive transfer rates, and drive speed. Put another way: you want a big fast external drive. You can get a pretty big drive for around $200CAD now (I like my Seagate), and an enclosure with Firewire or eSATA (external SATA) is about $50CAD. If you don’t have Firewire or eSATA on your laptop you’ll need an adapter for that as well (also $50). Why not USB 2.0? Firewire is 33% to 70% faster than USB depending on the operation. eSATA is about five times faster than USB 2.0. While many enclosures also have a USB port, the difference is well worth it. PCMCIA (CardBus) runs at 132Mbytes per sec so an adapter for any of these will treat you fine. Note that newer laptops may have an ExpressCard slot instead of a PCMCIA slot.

Technology

Transfer Rate (Mbits per second)

USB 2.0

480

Firewire 800

786

eSATA

1500 to 2400

Minimal Configurations

The assumption is that you know what you like, know what you want to do, and will download and install accordingly. That said, maybe you really do want to develop with Notepad so here goes.

On your development machine you need the .Net Framework version 3.0 and a development interface (IDE), whether it’s Visual Studio, SharePoint Designer, or a plaintext editor like Notepad. If you don’t have a physical server available, you will use either Virtual PC or VMWare to host SharePoint. Beyond these, everything is optional.

On your server, you need Windows Server, IIS, the .Net Framework version 3.0, and either WSS, MOSS Standard, or MOSS Enterprise.

Building the Client

.Net Framework 2.0. This is optional, but if you do any development beyond SharePoint you likely have clients on v2.0.

.Net Framework 3.5
WPF, WCF, and essential to SharePoint: Workflow. Note that MOSS 2007 works great with .NET 3.5, is supported by Microsoft, and there is no reason not to deploy it for all your servers.

[Update 2008-11-04] Do not install .NET 3.5 SP1 if you require Records Center, and until the cause is identified there is a risk that other features are also affected. .NET 3.5 itself remains okay, this issue is only reported with SP1.

Microsoft Office SharePoint Server 2007 SDK [Read it online]
The MOSS SDK includes the Enterprise Content Management (ECM) Starter Kit, a BDC definition editor, an Excel UDF sample, great workflow samples, and lots more.

Windows SharePoint Services (WSS) 3.0 Software Development Kit (SDK) [Read it online]
The MOSS SDK contains this so you don't need both. If you only do WSS development, then you only need the WSS SDK.

Red Gate .NET Reflector (was Lutz Roeder's Reflector)

One of the best .NET tools ever, and the way you'll browse object models and cut the class-assembly strings you'll need to paste into your manifests and web.config. “Reflector is a class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows you to view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.”

SharePoint Manager 2007
The best SharePoint management tool there is. Browse the complete object model, deactivate features, and even update object properties. You do need to be careful with this one, but wow it's powerful.

Office System Professional Plus Edition
Grab your disc, MSDN, or get the evaluation version. The Professional Plus edition includes Word, Excel, Outlook and PowerPoint plus: Access, Publisher and InfoPath. There is also an Enterprise edition which also includes OneNote and Groove.

SharePoint Designer (SPD)
Grab your disc, MSDN, or get the evaluation version.

Visual Studio 2005 or 2008
Grab your disc, MSDN, or get the evaluation version. I prefer either VS Professional or VSTS Developer Edition.

Visual Studio 2005 Extensions for .NET Framework 3.0 (Workflow Foundation)

Not required with VS 2008 where these features are baked-in. Design Windows Workflow Foundation solutions for SharePoint and other .NET applications.

Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO)
VSTO is used to build: Office System (Word, Excel, etc.) Add-ins and Ribbon elements, Outlook forms, and InfoPath templates.

Other Visual Studio Extensions. Optional extensions are available unrelated to SharePoint, though you should know they exist if you do other .NET development.

Virtual PC 2007

This is where you will build all those beautiful webs! VMWare is a popular alternative.

SQL Server Express Edition
You may want SQL Express if you develop more than SharePoint and need a local data store. If not, it is built into the SharePoint standalone install so you do not need to download or install it locally.

Optional

Fiddler HTTP Debugger
Optional and strongly recommended. Inspect and manipulate HTTP traffic between your browser and the server, great for debugging forms and web services, determining whether Kerberos tokens are being generated, and more.

Internet Explorer Developer Toolbar
The IE Developer Toolbar is optional, but recommended. Inspect HTML source, style usage, IFRAME content, image locations, and more.

PowerShell (formerly Monad). [SharePoint Provider] [Script Repository]
PowerShell is optional, but recommended. Write scripts to automate administration and configuration tasks. Colin Byrne has posts to get you started: PowerShell and SharePoint, Build Me A Portal, and Upload a Directory in 4 Lines.

BDC Metadata Manager
Generate BDC XML from SQL data sources. The commercial version also builds definitions for web services. An alternative is baked into the MOSS SDK, but BDC Metaman will continue to be the gold standard.

Visual Studio 2005 Extensions for Windows SharePoint Services 3.0 (VSeWSS)
Not recommended. VSeWSS contains nothing to help you deploy features on anything but the machine running VS, does not support x64, and is required to open projects that it creates. So if you create a project today on a 32-bit machine, you will be unable to open it in a year when you're building on 64-bit. This is bad. The one good feature included is the SharePoint Solution Generator (SPSolGen) which converts lists and sites “Saved as Template” into list and site definitions. [Learn more here] [Registry hack to install VSeWSS to a machine that is not the server]

Required to create a private LAN between the client and server

Microsoft Loopback Adapter

a. Click Start, Control Panel, and open the Add Hardware wizard.

b. Click Next. Wait a moment while the wizard scans for hardware.

c. Select: Yes, I have already connected the hardware, click Next.

d. Scroll to the bottom of the list and select Add a new hardware device. Click Next.

e. Select: Install the hardware that I manually select from a list (Advanced). Click Next.

f. Select: Network adapters. Select: Microsoft. Select: Microsoft Loopback Adapter.

g. Click Next. Click Next again. Wait a moment. Click Finish.

Configure the Loopback Adapter

h. Click Start, Control Panel, and open the Network Connections utility.

i. Right-click the Microsoft Loopback Adapter connection and select Properties.

j. Double-click Internet Protocol (TCP/IP).

k. Now configure an address for this adapter.
Select: Use the following address
IP Address: 10.50.50.1
Subnet mask: 255.255.255.0
Default gateway:
You can ignore DNS. Click OK. Click OK again.

Building the Server: Articles

Bob Fox explains step-by-step how to install Windows 2003 to Virtual PC and VMWare (up to the point where you install the OS).

Bob Fox explains good habits on re-using your base image for several implementations, and why you might need to add servers to the farm (e.g. for Exchange).

How to Create a MOSS 2007 VPC Image. This step-by-step series with screenshots by Tony Zink is as complete as complete can be and starts with configuration of IIS. Note that he puts SPD and Office on the server, while the goal of this post is to keep your server clean of client apps.

Microsoft Guidance on Standalone and Farm configurations.

Kevin Hoffman explains how to build a Standalone SharePoint server. He installs Visual Studio to the server, you can skip that step and run it locally on your development machine.

Jonathan Bradshaw explains how to build a Small Farm configuration with SQL and AD on a separate machine. His “OfficeDev” machine looks the most like our local development machine. One day someone will write an article with configuration steps, until then this is a good start.

Building the Server: Step-by-Step

Step 1: Install the Operating System

Windows 2003 Server R2. Grab your disc, MSDN, or get the evaluation version. Bring the machine up-to-date with Windows Update. Note that  this process can last several hours.

Step 2: Configure Networking

R. Aaron Zupancic describes how to configure an IP address and host file entry so you can surf your virtual SharePoint sites from your development machine.

Simon Guest describes how to get all the machines in a virtual farm to talk to each other. In this configuration, while your virtual machines will see each other, your local machine will not be able to surf or debug the virtual machines.

Note that if you can join your virtual machine to your company’s domain and create domain accounts there (but different accounts than you will use for testing or production), it will simplify configuration and debugging, and you won’t need to make this or any machine in your development farm an Active Directory domain controller (DC). The drawback is that you need to be connected to the domain to get any work done.

Step 3: Install the .NET Framework

.Net Framework 3.0
WPF, WCF, and essential to SharePoint: Workflow.

Once activated and configured, Shut Down and back up your base server image. In the next steps you’ll prepare this machine for a specific purpose.

Step 4: Install Active Directory and DNS.

If this is going to be a Standalone configuration, you need a domain controller (DC). The Configure Your Server Wizard (Start, Administrative Tools) is a great way to assign roles to a server. Start with Domain Controller (Active Directory) and DNS.

If this is going to be a Small Farm, copy your base server image from the last step, and start building a second machine to host Active Directory and SQL Server. Note that after you install SharePoint you will not be able to make the machine a domain controller (unless you’re prepared for a world of hurt).

Step 5: Install Internet Information Server (IIS)

Once again, the Configure Your Server Wizard (Start, Administrative Tools) is an easy way to add the Application Server role to your VM.

Once IIS is installed, you will need to Allow ASP.NET 2.0.* in the Web Server Extensions section of the IIS Manager. If this option is not available, you may need to run the ASP.NET 2.0 setup and Repair your installation, which also sets the Allow flag.

Step 6: Install SQL Server

SQL Server Developer Edition [Google]
This is optional. If you don’t install it, Express Edition will be installed when you install SharePoint. However, Developer Edition includes the excellent SQL Server Management Studio, so if you have MSDN you may prefer it. For a production environment you will need to license SQL Server Standard or Enterprise Edition.

Step 7: Install SharePoint (WSS or MOSS)

Windows SharePoint Services (WSS) 3.0
WSS is a free extension to Windows Server. If your installation didn’t include WSS as an option, you can download now. If installing MOSS, then you do not need to separately install WSS. Also remember that you can upgrade a server, but you cannot downgrade from MOSS back to WSS. If you’re evaluating SharePoint you may want to start with WSS.

If you installed SQL Server Developer Edition, choose Advanced Installation to select your database.

Install the WSS Service Pack.

Microsoft Office SharePoint Server (MOSS) 2007
Grab your disc or MSDN, or get the evaluation version. Standard and Enterprise editions exist, so again keep in mind that you can upgrade but not downgrade. Enterprise includes Forms Server and the BDC. 

Install the Office SharePoint Server Service Pack. [SP1]

Shut down and back up your virtual machine image(s). 

Step 8: Configure SharePoint

Create a domain group for SharePoint Administrators, assign rights to it rather than any single account. The exception will be configuring SQL Server, where rights buried inside groups aren't always resolved and you need to assign permissions per-account.  

Create an account to use as your SharePoint Service account (e.g. SPService). Configure this to be your Application Pool identity (you'll need to search what rights are required until I complete this section).

Create a content crawler account (you'll need to search what rights are required until I complete this section).

Create a developer account with the same name as the account you use on your development machine (and it better not be Administrator). Add your developer account to the Administrators group (Global Administrators if this is a DC, local Administrators if not) and Debugger Users group.

Create a typical end-user account for testing. Make it a member of Domain Users.

Step 9: Configure the server for Development

If you must develop on the server, install Visual Studio now. On one side, developing locally is simpler than developing remotely. On the other side, it’s so handy to keep all your code in one place and you won’t ever wonder where the most recent version of x is residing. If you really can’t get the hang of remote debugging, you can always install VS later.

Open up File Explorer on the server and Add to Favorites your frequently-used paths including the 12 hive and the default web root.
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\
C:\inetpub\wwwroot\

Backup the 12 hive into a zip file marked as read-only, and named “[Drive]:\Backups\12Hive-Out-of-Box-DoNotUpdate.zip”. You get the idea. When you accidentally edit a default ONET.XML file with WordPad and kill your site you will be glad you did.

And finally, make a text file on your desktop with Joubin’s SharePoint paths.

Step 10: Configure remote debugging.

Once SharePoint is installed, share the folder with SharePoint’s assemblies (*.DLL). You may also want to copy the assemblies to your development machine:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI

Share the server’s web root and enable Read/Write.
C:\inetpub\wwwroot\

Install the Visual Studio 2005 Debugging Components to the server. You want Full Remote Debugging, not Native Remote Debugging.

Follow Ross Dargan’s instructions on configuring remote debugging. You’ve just completed his step 1 and if you created your developer account as specified then you’ve also done 2 and 3.

Take a look at Andrew Noon’s document on Remote Debugging SharePoint Web Parts. He has additional steps for enabling error messages in web.config and screen shots that show what debugging looks like in action.

Read: Setup Remote Debugging

Read: Debugging SharePoint Web Parts