Ajax enabled WCF Service stops working with Undefined error

Last post 07-18-2009 4:53 AM by Maulik Patel. 18 replies.

Sort Posts:

  • Re: Ajax enabled WCF Service stops working with Undefined error

    07-01-2009, 2:58 PM
    • Member
      10 point Member
    • aaminian
    • Member since 06-15-2009, 9:50 PM
    • Posts 9

    Alright, I've found a workaround:


    1.  Create a virtual directory in IIS pointing to the (Ajax-Enabled WCF Service)

         ASP.NET directory of choice (also, make sure .svc extension is mapped to

         aspnet_isapi.dll).


    2.  Change the startup page for your web app by setting the Start URL (Property Pages |

         Start Options) to the one hosted by IIS. So, for instance, if your the page that makes the AJAX WCF

         call is Default.aspx your Start URL will be http://localhost/AjaxWebSite/Default.aspx.  That way, once you

         make any changes to your app, it'll picked up by IIS.


    I believe that the self-hosting functionality in Visual Studio is not bullet-proof when it comes to

    creating/hosting AJAX WCF services on the fly, and that's obviously not the case with IIS.


    This workaround seems to be working for me consistently, at least for now. Tomorrow may be a different story Smile

        

  • Re: Ajax enabled WCF Service stops working with Undefined error

    07-02-2009, 1:32 AM
    • Contributor
      2,342 point Contributor
    • Maulik Patel
    • Member since 12-21-2007, 1:48 AM
    • Ahmedabad
    • Posts 333

    Hello aaminian,

    I am facing same problem. I tried to do what you explained above but still facing same problem. Your first point is pretty clear. I set virtual directory in IIS and also checked .svc is mapped to aspnet_isapi.dll.

    Second point is little confusing for me. Can you explain it in detail ? I also started new thread for my problem if you wish to post your answer to my thread.

    http://forums.asp.net/t/1442084.aspx

    Thanks in advance.

    Maulik Patel
    MCTS, Software Engineer

    Don't forget to click "Mark as Answer" on the post that helped you. This will give you point and help readers to know which post solved your issue and make their search easy.
  • Re: Ajax enabled WCF Service stops working with Undefined error

    07-16-2009, 4:40 PM
    • Member
      10 point Member
    • aaminian
    • Member since 06-15-2009, 9:50 PM
    • Posts 9

    Hi Patel,


    Sorry for the late response.  I usually get an email when someone updates a post but I didn't in this case!


    Anyhow, here is what I meant:

    1.  Right click on your ASP.NET application and select "Property Pages" at the bottom of the displayed context menu.

    2.  On the Property Pages form, select the "Startup Options" on the tree pane.

    3.  Select the "Start URL" radio button on the right (form) pane and put your url in the now-enabled text box; e.g., http://localhost/AjaxWebSite/Default.aspx


    I hope that helps,

    Alex

  • Re: Ajax enabled WCF Service stops working with Undefined error

    07-18-2009, 4:53 AM
    • Contributor
      2,342 point Contributor
    • Maulik Patel
    • Member since 12-21-2007, 1:48 AM
    • Ahmedabad
    • Posts 333

    Hi Alex,

    Thanks for your asnswer. Will try your suggestion. And will let you know if any problem.

    Maulik Patel
    MCTS, Software Engineer

    Don't forget to click "Mark as Answer" on the post that helped you. This will give you point and help readers to know which post solved your issue and make their search easy.
Page 2 of 2 (19 items) < Previous 1 2