Re: Forms Authentication - Reporting Services Web Service integration
From: Ramadass (anonymous_at_discussions.micorsoft.com)
Date: Wed, 29 Dec 2004 16:00:44 -0600
The credentials in the CredentialCache and the Principal objects are not
directly compatible( at least i couldnt get my Principal to translate into
Network credentials). What you could do is use security features in the web
service. If you are using WSE 2.0, then you could send the username and
password via the username token and validate the user at the reporting
service, using these credentials.
Hope this helps
"Paul Keegstra" <PaulKeegstra@discussions.microsoft.com> wrote in message
> I am working on an asp.net application which requires forms authentication
> the method for authenticating the web application using the underlying
> Directory as the user store.
> I have created my Forms Authentication process using the methods described
> in some MSDN samples and that works just great.
> The question/issue I have is this process results in the creation of a
> authentication ticket and setting of the Context.User to a GenericPricipal
> object. Now, another part of the application needs to run reports that
> defined in SQL Server Reporting Services by integrating the solution via
> reporting services web service (vs. a URL link).
> In my code to invoke the web service, I have to set the credentials on the
> reporting services web service object to something other than
> system.net.credentialcache.defaultcredentials or I end up with the
> credentials from the aspnet service account. I've tried setting <identity
> impersonate="true" /> in my web.config but that didn't do it. I can get
> working if I set my credentials to a new instance of the network
> rs.credentials = new
> Unfortunately, I can only seem to make this work by hardcoding the
> password, and domain.
> Is there any way to map a GenericPrincipal instance's properties to create
> valid NetworkCredentials instance? That seems to be the solution I need,
> I can't retrieve the password from the GenericPrincipal nor can I get it
> the FormsAuthenticationTicket (unless you have some suggestion in that
> I would appreciate any suggestions.