2

I am working on CRM 2011 and I have two buttons with javascript attached to them. One of them makes a call to a webservice on the same domain, and the other button makes an ODATA update request to the same domain again. So I have no cross-domain operations.

The issue I am facing is, if I press one button, and then press the other, I get a "No Transport" error on the second button. And after that both buttons start throwing the same error and don't work. But if I keep pressing the same button over and over, it works fine, for both the buttons. It is only when I switch between the two that I am seeing the error.

Any idea what is going on here? Thanks in advance!

user1081934
  • 151
  • 4
  • 14
  • I was looking at a few other posts and I found that using the fully-qualified url could be causing the issue. I was able to remove the full qualified url for the odata request and that works fine now everytime, even if I try it after the web service call. But for the web service call, I cannot remove the fully-qualified url because it has a specific port. It almost seems like it might be some sort of caching issue, because the web service call works the first time I try it, but then if I do the odata and then try the web service again it throws the error. Any ideas? – user1081934 Feb 29 '12 at 19:17
  • Posible duplicate question http://stackoverflow.com/questions/5241088/jquery-call-to-webservice-returns-no-transport-error – Iain Mar 02 '12 at 13:46
  • @lain : My scenario does not involve any cross domain operation so it is different from the question at the link you have posted – user1081934 Jul 31 '12 at 18:08

2 Answers2

1

The following blog helped me. Shows a way to build a server url instead of using the soon to be deprecated Xrm.Page.context.getServerUrl(). Also links to a post about cross browser jquery support code (jQuery.support.cors = true;).

http://mysoftwarenotes.wordpress.com/2013/01/07/crm-2011-ajax-call-using-jquery-returns-no-transport-error/

JYo
  • 11
  • 1
0

This may or may not be useful to you, but I encountered a similar problem with the oData service. If I connected to CRM on our network using the IP address of the server then my oData calls encountered the "No Transport" error. However, when connecting via the name registered in DNS I had no such transport issues. So it looked to be related to the way the trust was setup on the corporate network.

This doesn't seem to reconcile why your calls work with one button click but not multiple clicks (as you mention perhaps caching related), but based on your later comment it may be relevant.

Philip Rich
  • 637
  • 1
  • 9
  • 20
  • Thanks for the your response. My issue doesnt seem to be what you experienced. Since the "No Transport" error shows up when I make the odata request and then make the web service call, I tried opening up Fiddler to see whats going on and found that no request is actually getting sent out to the web service when the "No Transport" error shows up. So it looks like the IE browser might be throwing the error. Have you seen a scenario like this before where the request doesn't show up in Fiddler at all? – user1081934 Jul 31 '12 at 18:11
  • Just to clarify, the web service call is to my custom web service and the odata request is to the CRM 2011 OrganizationData service. I tried using $.ajaxSetup({ cache: false }); and also cache: false in the $.ajax() request. Both dont seem to be making any difference. I still see the same no transport error. Anybody have any ideas on this? – user1081934 Aug 02 '12 at 18:35
  • @user1081934 Is your service deployed on the same server as the Dynamics instance? – Philip Rich Aug 02 '12 at 21:35
  • My custom web service proxy is on the same machine as the CRM but the actual web service is on a different machine. Do you think that might have something to do with this error? – user1081934 Aug 03 '12 at 13:16
  • @user1081934 Not sure I can offer anything else generic which may solve your issue. You say both of your buttons work in isolation, but not when clicked sequentially. It may be worth posting the code behind these buttons onClick events so others can see exactly what is going on. – Philip Rich Aug 06 '12 at 21:03