Forms authentication and the ReportingService Web Service


After you’ve gotten the SQL Reporting Services Forms Authentication sample working, the next logical thing to do is access the Web Service itself while your SSRS instance is running under forms auth…but how do you authenticate?


Rather than populating the credential cache of the ReportServer instance with Windows credentials, you need to call the LogonUser method ala:


    rs.LogonUser(formsAuthUserName, formsAuthPassword, null);
   
However, there’s still work to do. You also need to extend the proxy class of ReportingService on the client a bit so that it can handle forms-auth related cookies.


To get a great copy-and-paste example of how to do this, just hit books online and look up the LogonUser method…then check out the RSClient class that makes up part of the sample code.


 

Comments (2)

  1. denny says:

    "Just hit the books" —

    I did and now my hand is sore!

    perhaps you can tell us where to hit??

    really thouhg….

    I find a lot of samples that are for RS 2000 and do not address the new 05 winforms control.

    looking for more info so far is not helping…

    the docs say things like "if you need to do this you have to impliment some stuff…"

    and they do not even say what interfaces half the time 🙁

    we need a good walkthru of some real-world cases….

  2. The topic in question is in SSRS 2000 books online and is titled "ReportingService.LogonUser Method". It is true that the samples don’t always fully implment all the interfaces — however the forms auth sample is used by lots of people, which interfaces are you looking at that need to be implemented?

    As far as Forms Auth and the Win/Webform report viewer controls, I haven’t really played with that stuff yet…I’ll add it to the list 🙂