473,779 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

debug a custom membership and role provider?

My website uses a custome membership and role provider. I can use a custom
login control and user creation control and can debug my providers while
doing so with breakpoints. However, when I launch the asp.net website config
tool and go to the security tab, I get a polished screen with the error
message:

The object refererence is not set to an instance of an object

But despite putting breakpoints everywhere in both the roleprovider and
membershipprovi der, no breakpoint is hit. Any tips on how to debug this? What
code is executed when this tool is run and you go to the security tab?

-Ben
Mar 27 '06 #1
5 3406
On Mon, 27 Mar 2006 08:26:01 -0800, Ben R. wrote:
The object refererence is not set to an instance of an object


You need to attach to to the Administrative Websites's process in the
debugger. Tools->Attach to process.
Mar 27 '06 #2
Hi Ben,

Thank you for posting.

From your description, I understand you're developing your custom ASP.NET
2.0 membership and role manage provider, when used in your application, you
can step through their source code to debug them. However, when you
launching the vs 2005 web admin page for the site and manage the security
setting, you encountered some exceptions(null reference...) and the break
point in your custom provider's source did not get hit, correct?

Based on my understanding, since the problem occured when you use the web
admin pages, I think it is likely some certain code of the web admin site
expect a certain interface or member which is not found on our custom
provider class. the Web Admin site's page and code are under the .net
framework 2.0's system folder. e.g;

C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \ASP.NETWebAdmi nFiles

So if you want to do some further troubleshooting , you can have a look at
the related code(specific to the security configuration page) there. e.g if
the error occured at initialize time, you can check the initliaize and load
specific code to see what's has been called there.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 28 '06 #3
Thanks, Steven. This helped me to solve the problem!

-Ben

"Steven Cheng[MSFT]" wrote:
Hi Ben,

Thank you for posting.

From your description, I understand you're developing your custom ASP.NET
2.0 membership and role manage provider, when used in your application, you
can step through their source code to debug them. However, when you
launching the vs 2005 web admin page for the site and manage the security
setting, you encountered some exceptions(null reference...) and the break
point in your custom provider's source did not get hit, correct?

Based on my understanding, since the problem occured when you use the web
admin pages, I think it is likely some certain code of the web admin site
expect a certain interface or member which is not found on our custom
provider class. the Web Admin site's page and code are under the .net
framework 2.0's system folder. e.g;

C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \ASP.NETWebAdmi nFiles

So if you want to do some further troubleshooting , you can have a look at
the related code(specific to the security configuration page) there. e.g if
the error occured at initialize time, you can check the initliaize and load
specific code to see what's has been called there.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 29 '06 #4
You're welcome Ben,

Have a nice day!

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 29 '06 #5
Hi Ben,

- in VS.NET select Debug, Exceptions...,
- activate the checkbox "Thrown" of the CLR Exceptions, ok
- start the Web Site Administration Tool (WAT)
- in VS.NET select Debug, Attach to process...
- select "WebDev.WebServ er.EXE", there a two, the one with the higher ID is
the right one

Now use the WAT as usually. The debugger should stop in the code line of
your custom MembershipProvi der, that throws the exception. Breakpoints should
also work.

Hope this helps
ulrich

"Ben R." wrote:
My website uses a custome membership and role provider. I can use a custom
login control and user creation control and can debug my providers while
doing so with breakpoints. However, when I launch the asp.net website config
tool and go to the security tab, I get a polished screen with the error
message:

The object refererence is not set to an instance of an object

But despite putting breakpoints everywhere in both the roleprovider and
membershipprovi der, no breakpoint is hit. Any tips on how to debug this? What
code is executed when this tool is run and you go to the security tab?

-Ben

May 17 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2557
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the web.config of the particular site showing the reference to the custom provider, allowing .Net to do...
4
2241
by: techsupport | last post by:
I have some experience with .NET Remoting, as well as ASP.NET 2.0, and have been wanting to remote a custom membership and profile provider. I want to take advantage of the new controls in ASP.NET 2.0 such as Login, Loginuser, Loginview, etc. The ASP.NET provider model requires entries in the web.config for a 'connectionStringName', which I understand is utilized to connect to the data source. Problem is the client machine (machine A)...
1
4803
by: CK | last post by:
Does anyone have any experience with this? We have an exisitng sql database with user and role info. I need to write a custom role provider to use this data. Does anyone have any examples of this being done? I have googled it and I see on MSDN an XMLReadOnlyRoleProvider. I need something similiar to this. When writing a custom role provider, does the developer write the ADO.NET code in the methods to retrieve the user and role info? My only...
1
4996
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database - An easy way to classify different pages as either Admin, Member or Public, where login is necessary for Admin and Member but not for Public. My idea was to put the pages in different directories to easily keep my order. - An easy menu system that...
8
5289
by: Tomasz | last post by:
Hello Developers! I have an interesting problem using my custom MembershipProvider, RoleProvider and Forms Authentication. Both MembershipProvider and RoleProvider require session state, where some very important context data are stored during the Session_Start event. My MembershipProvider and RoleProvider depend on this information. It seems that authentication process works with no problems.
3
2184
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different projects, and have different roles per project. The current model.. * When a user joins my site, they eventually end up joining or creating one or more projects. But, they are not required to be a member of a project to be a member of the site.
4
8237
by: alexandis | last post by:
There are tons of articles about custom role and provider membership, but they just tear me apart and confuse :( The situation is following: I use DB2, so I wrote custom role + membership providers. Membership provider seems to work. I use forms authentication, so as articles say, I need to do some magic to be able to get roles for current user, because microsoft mechanism works only for windows authentication...
4
1708
by: alexandis | last post by:
We have tables of logins (users), that differs much from standard microsoft structure - we don't use control question/answer, date fields, etc. But instead we have several additional fields. I expanded membership class and it works for logging in, but going further - creating user - I must make following in CreateUserWizard template: 1) create 'users' record filling standard microsoft fields and ignore those I don't use (mentioned...
6
2933
by: Jonathan Wood | last post by:
Although this will be a challenge at my level of ASP.NET knowledge, I'm thinking I should implement my own membership provider class. Looking over the methods I must implement, a number of questions come to mind. 1. How would one implement GetNumberOfUsersOnline? I'm not sure where there is any indication of this? And it this affected by the "Remember me next time" checkbox, which doesn't seem to work like it does on any other site...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.