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

RadComboBox LoadOnDemand, WCF and Windows Authentication

4 Answers 63 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 11 Jul 2012, 08:07 PM
I have a problem that I am having trouble finding a solution for:

I have a web app using Windows Authentication and one of the forms has a RadComboBox control for which I want to populate by means of a WCF service call.

I've configured everything according to the tutorial instructions, and that works fine. My problem is that I need to pass the user's Windows security credentials to the service call to extract the username of the user.

When I configure the webHttpBinding to use Transport or TransportCredentialsOnly:

<webHttpBinding>
        <binding name="webHttpBindingConfiguration" 
                 maxBufferPoolSize="2147483647" 
                 maxBufferSize="2147483647" 
                 maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" 
                        maxStringContentLength="2147483647"
                        maxArrayLength="2147483647" 
                        maxBytesPerRead="2147483647" 
                        maxNameTableCharCount="2147483647" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"></transport>
          </security>
        </binding>
</webHttpBinding>

the service call fails. Fidder2 shows a Interal Server Error (500) and:

"No Proxy-Authorization Header is present."

"No Authorization Header is present."

I cannot find any guidance for using Windows Authentication for these service calls.

If it is not possible to use Windows Authentication with these calls, can I intercept the RadComboBoxContext object and add an entry with the user's username before the call is made, so I might extract it in the service method?

Your assistance is greatly appreciated.

Charlie

4 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 11 Jul 2012, 08:09 PM
Note: The most desirable solution would be to enable Windows Authentication for the service call. Anonymous access is frowned upon here.
0
Cat Cheshire
Top achievements
Rank 1
answered on 17 Jul 2012, 08:29 AM
You can enable the Anonymous Authentication on your application from IIS Manager -
http://www.iis.net/ConfigReference/system.webServer/security/authentication/anonymousAuthentication
0
Charles
Top achievements
Rank 1
answered on 17 Jul 2012, 12:09 PM
I was able to get what I needed via the context object.

I still want to get this to work using Windows Authentication, if this is possible. Anonymous access is not a desirable solution.

Also, the documentation for the RadListBox states that the process for using WCF to load the list box is the same, but is it really? Does the method still use the context object to pass parameters?

Thanks,

Charlie
0
Genady Sergeev
Telerik team
answered on 20 Jul 2012, 07:27 AM
Hi Charles,

I suggest that you take a look at this SO thread describing how to set authorization header for windows authentication using JavaScript.

As for the RadListBox WCF binding, yes, it uses context as well. Here is sample method that returns RadListBoxItemData:

[OperationContract]
    public RadListBoxItemData[] LoadData(Dictionary<string, object> context)
{
}



Regards,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Cat Cheshire
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or