2008. 6. 24. 17:33ㆍSystem/Microsoft SharePoint
이 글은 원격 컴퓨터의 웹파트를 디버그하고 개발하는 방법을 소개합니다.
내용은 MSDN의 내용을 발췌하였습니다.
Developing and Debugging from a Remote Computer
To use a remote computer to develop and debug, follow these steps.
Note To follow these steps, you must have a client computer running Visual Studio .NET (Computer_A) and a server computer running Windows SharePoint Services (Server_B).
- On Server_B, share the directory that hosts the SharePoint virtual server. By default, the Windows SharePoint Services virtual server is mapped to the following directory:
- Ensure that you have Read and Write permissions for this directory and its sub-directories.
- On Server_B, share the directory in which the Microsoft.SharePoint.dll file is located. By default, the Microsoft.SharePoint.dll file is located in the following directory:
local_drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\ISAPI
- Make sure that you have Read permission for this directory.
- On Computer_A, follow these steps:
- Click Start, point to All Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.
- On the File menu in Visual Studio .NET, click Open.
- Browse to the Web Part project that you want to debug, and then click Open.
- Right-click the project name, and then click Properties.
- In the navigation tree, double-click Configuration Properties.
- Under Outputs, verify that the value for Output Path matches the following line:
- In Windows Explorer, browse to the following folder:
- Double-click the Web.config file.
- In the Web.config file, search for the
- Verify that your assembly is listed as a Safe Control. If not, add the following line to the Safe Controls list.
<SafeControl Assembly="assembly_name, Version=assembly_version, Culture=assembly_culture, PublicKeyToken=assembly_public_key_token" Namespace="assembly_namespace" TypeName="*" Safe="True"/>
- Save and close the file.
- On Server_B, install and configure the remote debugging services.
For more information about remote debugging, visit the following MSDN Web site: Visual Studio: Setting Up Remote Debugging.
When you debug or modify an assembly, you may receive the following error message:
Unable to replace file_name.dll after compilation.
This behavior may occur if the W3wp.exe process locks the old copy of the assembly located in the InetPub\WWWRoot\bin directory. To resolve this issue, use Task Manager to end the W3wp.exe process, recompile the assembly, and then resume the debugging process.
Web Parts for Windows SharePoint Services are ASP.NET server controls. Therefore, the process for debugging Web Parts is similar to the process for debugging ASP.NET server controls.