all groups > sql server reporting services > august 2004 >
You're in the

sql server reporting services

group:

Form Authentication for SOAP Access Sample Available


Form Authentication for SOAP Access Sample Available Teo Lachev
8/27/2004 4:58:51 PM
sql server reporting services: Someone was asking a week or so ago for a sample code that shows how to
request reports via the RS Web service when RS is configured for Forms
Authentication. Well, I whipped out a simple WinForm app (sorry C# only, but
they are free converters out there for C#->VB ) to show how this could be
done. Basically, the changes boil down to storing the authentication ticket
(cookie) on the client side and passing it back with each request.

This sample doesn't have any bugs! Common, we all know this is not true :-).
Please let me know if something buggy raises its ugly head. Usual
disclaimers apply also...

For time being, you can download the sample from my website
(http://www.prologika.com/downloads/FormsAuthTester/RsFormAuthTester.zip).
One day it may find a more popular resting place.
--
Hope this helps.

-----------------------------------------------------
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
-----------------------------------------------------

Re: Form Authentication for SOAP Access Sample Available Teo Lachev
8/27/2004 5:37:57 PM
Forgot one important thing...

One thing that you may need definitely to change if you are planning to
retrofit my code to a web app is way the app stores the cookie. You will
notice that the sample app stores the cookie in a static class member. This
is fine with WinForm apps running on single thread by definitely no-no for
web applications where you need to be aware of multi-threading and
multi-user issues. If the web app is the same one that requests reports by
URL, the simplest solution may be not to store the cookie at all but to get
it from the current HTTP context, similar to the original implementation of
the overridden proxy class that comes with the MS sample.

--
Hope this helps.

-----------------------------------------------------
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
-----------------------------------------------------

[quoted text, click to view]

AddThis Social Bookmark Button