access to restricted uri denied - ajax calling web service

Last post 08-29-2008 7:12 PM by mrmercury. 1 replies.

Sort Posts:

  • access to restricted uri denied - ajax calling web service

    08-29-2008, 4:09 PM

    I am trying to create a custom web control and/or avoid using a custom web control by only using javascript as an embedded resource to be reused across multiple sites.  I am trying to avoid using a web control and merely point to a javascript resource so I won't need to declare the webcontrol value across the sites.

    When I make a call to the web service, I get the dreaded "access to restricted uri denied" b/c the web service is not in the same domain.  Does anyone have an example to call a web service, not using the ScriptManager/ServiceReference wrappers, to call using straight up AJAX to call a web service to avoid the access issue, probably specifically pointing to a proxy?

     

    Joseph Baggett

    http://www.myitstudio.com




    MCSD, MCPD: Web Developer, MCITP: Database Developer, MCTS: SQL Server 2005, MCTS: .NET 2.0 Web Applications, MCTS: .NET Framework 2.0 Windows Applications, MCTS: .NET Framework 2.0 Windows Applications, MCAD, MCP

    If the project doesn't work, blame Scott Guthrie and/or refer to the problem solving flowsheet. O.~
  • Re: access to restricted uri denied - ajax calling web service

    08-29-2008, 7:12 PM
    Answer
    • Contributor
      5,110 point Contributor
    • mrmercury
    • Member since 04-04-2006, 2:26 PM
    • Mexico City, Mexico
    • Posts 743

    You can use the invoke method of the Sys.Net.WebServiceProxy class, check this link:

     

    http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.Net/WebServiceProxyClass/WebServiceProxyInvokeMethod.aspx
    If this post helped you please remember to set it as Answer so it can help others.
Page 1 of 1 (2 items)