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

[Solved] Databind problem - WCF / IIS / IE

3 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 11 May 2009, 05:38 AM
Hi folks

I have got a very strange problem.... I developed my page using RadGrid which data binds on the client side using a WCF service. All worked fine on my local dev box so I checked in my code. However, the next day the testers report that it's not working.

When I look into the problem, it turns out that when the site is running in Internet Explorer (v6-8) under IIS, the RadGrid data binding doesn't work. The call to the WCF service never makes it to the server. What is even more annoying is that it is intermittent - I spent a couple of hours looking into it, then it started working. It then worked for around 24 hours then stopped working again. This has been going on for a week now! I have now managed to look into the problem for the last 3 hours today (without success) and it is still not working. The site is deployed on 3 different servers - it works on 1 at the moment, but not on the other 2.

It's driving me insane because it seems to debug into Telerik client side code, then I geta bit lost at this point.

Anyone got any advice?

Just to clarify.... it works 100% of the time when running in the Visual Studio web server, and also works 100% of the time in Firefox. The problem is specifc to Internet Explorer and IIS.
Also... some things worth noting... It's making it into the OnDataBinding event on the client side, so it seems to be going through the motions, but never makes it to the server. Also, the site is running in https - don't know if this affects things?

Thanks

3 Answers, 1 is accepted

Sort by
0
William
Top achievements
Rank 1
answered on 13 May 2009, 10:45 PM
No takers on this one??
0
Nikolay Rusev
Telerik team
answered on 14 May 2009, 07:50 AM
Hello William,

If you are using declarative client-side data-binding(as on the example RadGrid bound to WCF Web Service) RadGrid does post request to your service and parse result from it.
Other option is to try manually binding RadGrid as demonstrated on the following blog post:
RadGrid for ASP.NET AJAX client-side data-binding to WCF

However it seems like the issues is more with IIS and/or WCF service configuration if it stops working from time to time. I suggest you to use Fiddler and trace the requests to see whether some of them are failing on server and check the status code.

You can also check the following article as it explains what you need to have WCF working with ASP.NET AJAX:
JSON-Enabled WCF Services in ASP.NET 3.5

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
William
Top achievements
Rank 1
answered on 15 May 2009, 06:03 AM
Hi. Thanks for the reply.
Looks like you are right. I have managed to get it working but it took a lot of head scratching. You need to get the security settings exactly right otherwise it doesn't work. I had to set the directory security on the WCF service to "Allow anonymous" and "Integrated windows authentication", and I had to set the security in the web config as below. Something to note is that although I now have it working in IIS with this config, I have to remove the https endpoint for it to work in VS Web server. Very annoying.
Thanks again for the reply...

<

 

system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> 
<
behaviors>
<
endpointBehaviors>
<
behavior name="WcfAjaxServiceEndpointBehavior">
<
enableWebScript/> 
</
behavior>
</
endpointBehaviors>
<
serviceBehaviors>
<
behavior name="Service1Behaviour" />
</
serviceBehaviors>
</
behaviors>
<
bindings>
<
webHttpBinding>
<
binding name="webHttpBinding">
<
security mode="TransportCredentialOnly">
<
transport clientCredentialType="None" />
</
security>
</
binding>
<
binding name="basicHttps" >
 <
security mode="Transport">
<
transport clientCredentialType="None" />
</
security>
</
binding>
</
webHttpBinding>
</
bindings>
<
services>
<
service name="WebApplication1.Services.Service1" behaviorConfiguration="Service1Behaviour">
<
host>
<
baseAddresses>
<
add baseAddress="/Services/Service1.svc" />
</
baseAddresses>
</
host>
<
endpoint address="" name="Service1EndPoint"
behaviorConfiguration="WcfAjaxServiceEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="webHttpBinding" contract="WebApplication1.Services.Service1"/>
<
endpoint address="" name="Service1HttpsEndPoint"
behaviorConfiguration="WcfAjaxServiceEndpointBehavior"
binding="webHttpBinding" bindingConfiguration="basicHttps" contract="WebApplication1.Services.Service1" />
</
service>
</
services>
</
system.serviceModel>

Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
William
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or