I am learning to create a forms-based authentication for claims-based web application using custom membership and role provider based on the [msdn][1] link

I will be building a class library to implement a custom authentication solution.

This is the first time experience for the creation of class library. Please let me know how could I debug and troubleshoot the issues in the project.

I'm trying to follow this guide in creating a Forms-Based Authentication for Claims-Based SharePoint 2010 Web Applications Using Custom Membership and Role Providers.


from what i understand, the dll, when compiled and put into the GAC will be called by the web.config file in the central administration, web application and Security Token Service when user is trying to login or when the people picker is searching for the user. i want to know how do i set up a debugging mode so that i will be able to step through the code? do i need to create a blank SharePoint project and add the class files inside to deploy the solution first? Where do i deploy the solution to anyway?

  • Build and deploy the project in debug mode and attach to w3wp process Commented Oct 30, 2015 at 8:10
  • may i know what do you mean by deploying the project in debug mode? sorry im new so please be patient with me. :) i can build the project and under the Debug tab, i've found the w3wp process. Commented Oct 30, 2015 at 8:11
  • In Visual Studio, you have the option of building a solution in debug/release mode. It is usually present on top menu. You can also select the project. click on properties- > Select Debug and then in configuration select Debug Commented Oct 30, 2015 at 8:15
  • please bear with me, i got to the page where i see the Configuration and a drop down bar which i can choose 'Active (Debug)', 'Debug', 'Release', 'All Configuration'. so do i mean that i choose 'Debug'?. i tried to press the 'Start' button and it throws me the error "A project with an output type of class library cannot be started directly in order to debug" Commented Oct 30, 2015 at 8:20
  • You need to set it to debug and then deploy the project. Commented Oct 30, 2015 at 8:26

1 Answer 1


In order to deploy your project from Visual Studio, go to the Solution Explorer and right click on the name of the project as shown below.

enter image description here

Click the Deploy Solution button to deploy the project.

Once your project is deployed, go to the page for which you have coded on the browser.

Once this is done, go to the visual studio. Select Debug menu. In this menu select Attach to process. There will be a popup that will display several processes. Select add the w3wp processes available and click the attach button. Place debug points as per needed.

Now,go to the browser and perform the actions like button click. When the relevant action is taken, the debug point will be hit in the visual studio and you will be able to debug it.

  • if it is purely a dll class library, can i still attach it to the w3wp processes ? i realized i do not need the FBA viewer which is a wsp. i can't find the w3wp proccesses Commented Oct 31, 2015 at 1:44
  • Do I have to create an empty share point project and then add in the class files? Commented Nov 1, 2015 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.