How to Debug in the .NET Portal Source Code
Debugging the .NET portal source code can be something of a challenge for those who have not done this before. But it is achievable, once the relevant environments are configured to make debugging easier.
Firstly, you need to compile the source code, to create the appropriate project files (.csproj). We recommend reading this first.
After that is done, take the following steps to debug the .NET portal source code, which RevDeBug makes considerably easier:
- Set up the IIS Manager
- Establish Local Security Settings
- Debug in Visual Studio, with RevDeBug
1. Set up the IIS Manager
We have mentioned the IIS Manager in a previous blog, when talking about how to debug web applications in .NET. Now you need to access this program again, to create the right environment for debugging .NET portal source code.
Getting started means opening the IIS Manager in Start > Programs > Administrative Tools > Internet Services Manager.
Navigate to the virtual website called Portal. This is usually found under Web Sites\Plumtree Web Site or Web Sites\Default Web Site. Right-click Portal and select Properties And then work through the following steps to configure the IIS Manager:
Change the local path point in the Virtual Directory tab to:
- Click the Configuration option. The Application Configuration dialog box will appear. Click Mappings.
- Underneath, Application Extensions will appear. Select the .aspx extension and click Edit.
- In Verbs, select All Verbs.
- Do the same again for following extensions: .pt and .asax.
- Next, click the Debugging tab and select the Enable server-side script debugging box.8. Click OK to return to the portal Properties dialog box.
- To avoid difficulties in the next stage, click the Directory Security tab, and the Edit option, under the Authentication and access section.
- Select the Integrated Windows authentication tick box.
- Finally, click OK in the Authentication Methods dialog box and the Portal Properties dialog box.
- Exit the IIS Manager.
2. Establish Local Security Settings
Now you need to configure local security settings. Access them through: Start > Programs > Administrative Tools > Local Security Policy.
- Next, Expand Local Policies and click User Rights Assignments.
- In the window on the right hand side, right-click Debug Programs, and select Properties.
- Check if your user name is on the list (this should be the same one used for Windows Authentication). If not and there is no group that you are a member of, then click Add User or Group to join.
- Double click OK to close the window and exit Properties, and then Exit Local Security Settings.
3. Debug in Visual Studio, with RevDeBug
Once everything is set up, you can run the portal source code in the test environment. Enable RevDeBug to capture each line of code, to ensure you can step back into each stage of the source to isolate and fix bugs quicker.Back to list