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

WCF Web Service Load on Demand Combo box 401 Unauthorized

2 Answers 150 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Al asked on 15 Mar 2012, 04:57 PM
I have implemented the an AJAX enabled Web Service for my combo box exactly as explained here:
http://www.telerik.com/help/aspnet-ajax/combobox-load-on-demand-wcf-service.html 
http://demos.telerik.com/aspnet-ajax/combobox/examples/loadondemand/wcf/defaultvb.aspx 

It works perfectly on my development server running IIS7.5. When I run it on my remote test server also IIS7.5 - I get a 401 error. The rest of my ASP.NET4 web app works fine. Using Fiddler I find I get a 401 Unauthorized error - the inner exception being  "Authentication Failed" System.InvalidOperationException. The IIS log shows 401 0 0 after the POST to my web service, i.e. a sub error code of 0. I think this relates to "Access is denied due to invalid credentials"?

This post sums up my problem:
http://forums.asp.net/t/1431102.aspx/1 
But as you can see no answers.

I've spent a long time looking into this with no luck and I'm really running out of ideas. It must be down to some IIS configuration or permission or something similar. Has anyone had this problem before of know how to resolve it? Thanks

2 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 20 Mar 2012, 09:44 AM
Hi,

Thank you for contacting us.

Indeed the experienced problem seems like a configuration issue withe the permissions. In general the  WCF service which the RadComboBox consumes should have permission for anonymous access.
Please try to add the following lines in your web config file:
<location path="RadComboBoxService.svc">
  <system.web>
    <authorization>
      <allow users="*" />
    </authorization>
  </system.web>
</location>
  <system.web>

Please note that the above configuration is using some dummy name for the WCF service, so you should change it with the name of your service.

Kind regards,
Dimitar Terziev
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.
0
Al
Top achievements
Rank 1
answered on 20 Mar 2012, 10:28 AM
Thanks for the reply. I had included those lines already - it made no difference.

I spent 3 days trying to get to the bottom of this - Googling various forums - and finally had to accept defeat reluctantly, so I found another way around the problem using LinqDataSource as shown in: http://demos.telerik.com/aspnet-ajax/combobox/examples/loadondemand/automaticloadondemand/defaultcs.aspx 

It seems a little slower (I have a lot of data) but is an acceptable solution. I would still be interested to know the solution to the problem if anyone can figure it out.

Al
Tags
ComboBox
Asked by
Al
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Al
Top achievements
Rank 1
Share this question
or