New Posts New Posts RSS Feed: DevForce Authentication Issue
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

DevForce Authentication Issue

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: DevForce Authentication Issue
    Posted: 28-Feb-2008 at 8:53am

If I correctly understand your predicament, you find that you can continue advancing through the program by pressing F5 until you get through to the catch on the client. In other words, your application can continue just fine and would not stop here if you were running outside the debugger.

 

What you need, then, is to TELL the debugger to keep going (“don’t stop here”). You need to use one of the attributes that gives direction to the debugger.

 

Here’s an example from my LoginManager class code:

 

  [DebuggerStepThrough] // Let client catch exceptions

  public IPrincipal Login(ILoginCredential pCredential, PersistenceManager pManager) { ...

 

You may find several methods in your class that need this attribute … or another like it such as:

 

    [DebuggerNonUserCode] // Let client catch exceptions

  private static AppIdentity GetUserPasswordIdentity(ILoginCredential pCredential, PersistenceManager pManager) { …

 

Frankly, I don’t remember off the top of my head which of these two to use in which circumstances.

 

Here’s a web page that discusses these attributes: http://blogs.msdn.com/stevejs/archive/2005/12/03/499803.aspx

 

Please note that, once you have such an attribute in place, YOU CANNOT DEBUG INTO THE METHOD. If you try to put a breakpoint on a line in “Login”, you’ll see the brown dot just fine but you’ll probably overlook the tooltip that tells you the debugger won’t actually stop there.

 

So when you WANT to debug “Login”, you have to comment out the attribute. Just remember to uncomment it later J

 

 

Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 28-Feb-2008 at 8:50am

When debugging our application inside of Visual Studio.NET (in a non-remoting deployment environment) we encounter a break in code when our LoginManager throws an exception. Take this scenario for example:

1)      Client calls login on the persistencemanager with invalid credentials

2)      LoginManager throws an exception (invalid credentials supplied)

3)      Client application catches the exception, providing another attempt to login

It is at step 2 where our debugger is breaking on the exception, treating this as an unhandled exception. It is critical to our development team to handle this exception appropriately so that the debugger does not break unexpectedly during the login method. Do you have any suggestions to prevent the debugger from breaking when this exception is thrown?

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down