locked
Cannot call web service from client. RRS feed

  • Question

  • Hi Again CRM Gurus,

    Last week I asked how to call a DLL from javascript and it waqs suggested that I use AJAX to call the server side code.

    I created a web service and call it from a script in the CRM web client. Everything works fine when I use the CRM web client on the server. This is the server that runs both CRM and my new web service.

    When I use the CRM web client on a workstation, the script is not able to call the web service. I see an Object Required error .

    I created a web page on the server and pasted the javascript into this page. Again, the service is called when I use the browser on the server, but not on the workstation browser.

    I can, however, call the service from an aspx page running in the workstation browser.

    In short, I cannot call the web service from a script on the workstation. I can call the web service any way except from a script running on the workstation. 

    Thanks in anticipation.

    Derek Williams


    Derek
    Thursday, June 25, 2009 4:47 PM

Answers

All replies

  • Hi,

    I had also faced it,

    Check this post

    http://nishantrana.wordpress.com/2007/10/24/configuration-aspnet-web-service/

    You web service should be configured to allow post or get requests !


    <webServices>
        <protocols>     
            <add name=”HttpPost”/> 
            <add name=”HttpGet”/> 

     </protocols>
    </webServices>




    Regards,
    Nishant Rana

    http://nishantrana.wordpress.com
    • Marked as answer by Derek_Berek Saturday, June 27, 2009 7:10 PM
    • Unmarked as answer by Derek_Berek Saturday, June 27, 2009 7:18 PM
    • Marked as answer by Derek_Berek Saturday, June 27, 2009 7:20 PM
    Friday, June 26, 2009 5:39 AM
  • Thanks Nishant,

    That did the trick.

    Your blog is also very informative. I've bookmarked it.

    Another problem is that Javascript running from a CRM page does not give you any good error messages. Even if the web service fails, the javascript just says object expected, or something like that.

    Thanks again.

    Derek Williams

    Derek
    Saturday, June 27, 2009 7:21 PM