views:

1356

answers:

1

From what variable can you pick up the username from Forms Authentication in Microsoft SQL Reporting Services? The User!UserId value comes back as the Windows Account that reporting services is running under.

+1  A: 

I'm not 100% sure where you are confused here so please let me know if this isn't what you're looking for. I solved this issue myself a couple months ago when working with reporting services.

I found this chunk of code in my login.aspx.cs which is being called right after I've verified that a given username/password is authenticated/authorized.


// Setup a remote session with the current userID as the AuthCookie username.
// This userID is subsequently passed to reporting services as the UserID running the report
authCookie = FormsAuthentication.GetAuthCookie("the username here", false);

If this isn't enough information I can help you if you clarify your question.

Bob Albright