Replace Windows Logon Box for SQL Reporting Services

Discussion in 'ASP .Net Security' started by Samuel, Dec 30, 2004.

  1. Samuel

    Samuel Guest

    I want to customize the windows authentication of my SQL Reporting Service,
    so that I can:
    1. Replace the Logon Popup Box with my own webform
    2. Maintain the user profile in my Windows 2003 server
    3. User can logout even using Windows Authentication

    I tried to make a separated web application for Form Authentication on my
    web server (http://localhost/auth/login.aspx), it will be used as first page
    to access my report server.
    Then I use the LogonUser API from ADVAPI32.dll for password verification
    like the following code:

    Dim t1 as Integer
    Dim bOK As Boolean = LogonUser(userID, domain, password, 2, 0, t1)
    Dim pt1 As IntPtr = New IntPtr(t1)
    Dim wi As WindowsIdentity = New WindowsIdentity(pt1)
    Dim wp As WindowsPrincipal = New WindowsPrincipal(wi)
    HttpContext.Current.User = wp
    FormsAuthentication.SetAuthCookie(context.User.Identity.Name, False)
    Response.Redirect("/reports")

    But the Identity used in Reporting Service is still my local machine's user
    id, not the one I logon in my customized login page.
    What should I do? is there any other way to do it?
    Can I use impersonation to do it? But the impersonated user is dynamically
    change according to the logon user. How can I do it? Thanks.
     
    Samuel, Dec 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raju
    Replies:
    0
    Views:
    459
  2. Mark
    Replies:
    1
    Views:
    443
    Natty Gur
    Nov 25, 2003
  3. Oney
    Replies:
    3
    Views:
    1,139
    Scott Allen
    Nov 12, 2004
  4. Mark
    Replies:
    2
    Views:
    2,143
  5. Kjell Kristiansson
    Replies:
    0
    Views:
    294
    Kjell Kristiansson
    Nov 30, 2005
Loading...

Share This Page