Replace Windows Logon Box for SQL Reporting Services

S

Samuel

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top