Browse DevX
Sign up for e-mail newsletters from DevX


Developing Web Parts for SharePoint Portal Server 2003 in .NET : Page 6

This article provides a step-by-step introduction to developing Web Parts using Visual Studio .NET by showing you how to build both simple and complex Web Part components. Along the way, you'll see how to debug Web Parts both locally and remotely—and learn a few tricks and tips.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Debugging Web Parts
You can use Visual Studio .NET's debugging facilities to debug your Web Part applications either locally or remotely. Unfortunately, debugging Web Parts is not quite as seamless as debugging a Windows application. Debugging Locally
In this situation, Visual Studio .NET and SharePoint are installed on the same machine. To debug:

  1. Open the Web Part project in Visual Studio .NET
  2. Ensure that the project Output Path is set to the following location in the project Property window: local_drive\InetPub\wwwroot\bin\. (See the section Setting the Output Path for Web Part Applications section for more details)
  3. Make sure you have added the Web Part to the SafeControls list. (Refer to the section Creating SafeControls for more details)
  4. Open the Web Part class file you want to debug and add breakpoints just as you do in any Windows or ASP.NET application in VS .NET.
After successfully opening the project and attaching the necessary breakpoints, the next step is to attach the W3wp.exe Processor. Attaching the w3wp.exe Process
  1. Click the Debug menu in VS .NET and select Processes. You'll see the Processes dialog shown in Figure 16.

  2. Gayan Peiris is a Senior .NET Consultant for UniqueWorld Pty Ltd in Canberra, Australia. He is an MCP with Bcom and MIT certifications. Gayan has been designing and developing Microsoft Web and Windows solutions since 1999. His expertise lies in developing scalable, high-performance Web and windows solutions. His core skills are ADO.NET, ASP.NET, C #, VB.NET, Web Services, XML, SharePoint Portals, DNA and SQL Server. He can be reached at his Web site www.gayanpeiris.com or via email
    Comment and Contribute






    (Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date