This is a migrated thread and some comments may be shown as answers.

Supporting both Windows and Basic Auth

3 Answers 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 15 Feb 2012, 05:49 PM
I have a ReportService.svc that is called from clients that are either passing credentials using Windows or Basic auth depending on their browser.  How can I support both Windows and Basic auth calls to the ReportService.svc from Telerik Reporting for Silverlight?

<basicHttpBinding>
    <binding name="basicBinding">
        <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
        </security>
    </binding>
</basicHttpBinding>

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 20 Feb 2012, 04:12 PM
Hello Keith,

What you can do is create two services, the first will handle the Windows authentication and the second will handle the Basic authentication. If Windows authentication fails you can fallback to Basic authentication.

One service with BasicHttpBinding cannot support multiple authentication mechanisms, because the ClientCredentialType is a single object and not a collection and the HttpClientCredentialType enumeration does not contain mixed modes.

Multiple Authentication Support will come with WCF 4.5 - until then you will have to use workarounds.

Greetings,
IvanY
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Keith
Top achievements
Rank 1
answered on 22 Feb 2012, 06:08 PM
Where do you suggest I handle the auth error at?  I am using the Silverlight ReportViewer and it has the ReportServiceUri hardcoded.
0
IvanY
Telerik team
answered on 27 Feb 2012, 02:42 PM
Hello Keith,

If you have two services you will need two clients for these services as well. If the first client raises an error you can try the second one. As for the ReportServiceUri - it is a public property with getter and setter, so it can be manipulated at any time. Here is the Reporting API Reference for the property.

Greetings,
IvanY
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Keith
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Keith
Top achievements
Rank 1
Share this question
or