locked
How to change the runtime (debug) Userid RRS feed

  • Question

  • Under debug the application appears to run under a user named TestUser, even when I specify Windows Authentication. Is there some way to debug with the userid of the currently signed-on user?

    Thanks,

    Wednesday, August 25, 2010 7:04 PM

Answers

  • Unfortunately not in Beta 1.  This will be fixed in the next beta release, though.  The intention is to use the current user's Windows creds if you're using Windows authentication.  But for Forms authentication, the "TestUser" account will still continue to be used.  For now, you'll need to write some logic to compensate for the current behavior.

    Wednesday, August 25, 2010 7:39 PM

All replies

  • Unfortunately not in Beta 1.  This will be fixed in the next beta release, though.  The intention is to use the current user's Windows creds if you're using Windows authentication.  But for Forms authentication, the "TestUser" account will still continue to be used.  For now, you'll need to write some logic to compensate for the current behavior.

    Wednesday, August 25, 2010 7:39 PM
  • It seems the LS philosophy for tesing while developing is to have the logged in user hard coded as "TestUser", with the privileges granted ("Granted for Debug") as per the "Access Control" page of the application Properties.

    This is a rather novel approach, and took a while for me to get used to. 

    However, if you're using privileges for security, it's actually handy because you can toggle privileges on and off and see how the app behaves.  It's faster than running the app, finding your account, changing the roll on your account, and saving.  Plus, to vary permissions you'd have to either edit the role, or set up multiple roles.

    Where it's a problem is if you're trying to access exterior data/application/services when LS is presenting "TestUser" credentials to them instead of your own...

    Wednesday, August 25, 2010 7:41 PM
  • Thanks for the feedback.  I actually talk about this feature in one of my blog posts on LightSwitch authentication which you may want to read: http://blogs.msdn.com/b/mthalman/archive/2010/08/23/authentication-features-in-visual-studio-lightswitch.aspx.
    Wednesday, August 25, 2010 10:49 PM