The service '/Services/MyWFService.xamlx/_vti_bin/ListData.svc' does not exist... ???

Unanswered The service '/Services/MyWFService.xamlx/_vti_bin/ListData.svc' does not exist... ???

  • Wednesday, March 07, 2012 3:23 PM
     
     

    Hello,

    I have an ASP.NET solution.

    I created a workflow service under Services folder in that solution.

    Full URL : http://localhost:49762/Services/MyWFService.xamlx

    Tested with web browser : I confirmed that the service page is loaded.

    Tested with WCF Test client : I am able to add this service to test. -> works fine.

    Created a client by Service Reference in the same asp.net solution and tested -> when adding a reference, I got an error.

    Type : System.Web.HttpException, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The service '/Services/MyWFService.xamlx/_vti_bin/ListData.svc' does not exist.

    Source : System.Runtime.DurableInstancing Help link :

    WebEventCode : 0

    ErrorCode : -2147467259

    Data : System.Collections.ListDictionaryInternal

    TargetSite : TAsyncResult End[TAsyncResult](System.IAsyncResult)

    Stack Trace :    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService)

       at System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e)

       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Inner Exception

          ---------------

          Type : System.ServiceModel.EndpointNotFoundException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

          Message : The service '/Services/MyWFService.xamlx/_vti_bin/ListData.svc' does not exist.

    Created a client by Service Reference in the different solution(ex, created a console app for testing purpose) and tested  ->

      got same error like above.

    What should I look at to resolve this issue?

    Thanks,

All Replies

  • Wednesday, March 07, 2012 3:57 PM
     
     

    I think I found why...

    In my Global.asax file, Application_Error is being handled like this.

    Exception ex = this.Server.GetLastError(); and log the error, and redirect to different page if requested file doesn't exist.(Status Code = 404)

    I *guess*, when workflow service client is generated,  ListData.svc handler(not physically exists) internally is used.

    So my Application_Error catches the error because ListData.svc does not exist in my solution.

    Well, I could simply remove the Application_Error, but I can't cuz it is being used for my asp.net solution.

    What would be best way to handle this scenario?

    I guess I may ignore this error message, but any better solution?

    Thanks,

  • Friday, March 09, 2012 10:33 AM
    Moderator
     
     

    Hi,

    I created a "ASP.NET Web Application" in Visual Studio 2010, add a sub folder named "Services" to this project, and add a new item "WCF Workflow Service" to the new created folder. I also have following code in Global.asax .

            void Application_End(object sender, EventArgs e)
            {
                //  Code that runs on application shutdown
                Exception ex = this.Server.GetLastError();
                if(Response.StatusCode==404)
                {
                    Response.Redirect("default.aspx");
                }
            }

    However, I can't reproduce this issue. Could you please rebuild the solution to see if it works? If your problem persists, can you provider a sample project for us to reproduce this issue. Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Friday, March 09, 2012 3:29 PM
     
     

    Try

    Exception ex = this.Server.GetLastError();

    HttpException hEx = ex as HttpException;

    if(hEx != null) {

     if (hEx.GetHttpCode() == (int)System.Net.HttpStatusCode.NotFound) {

                //Send email info to your email account and redirect page.

     }

    }

    Then try to create a console client and add service reference.

    U r going to see that error. also..when you debug, and are adding the service reference, you are going to see that breakpoint will hit that exception handling code if you set the breakpoint over there.

    BTW, what is for ListData.svc?

    Is that some handler file that created by M$ and internally being used for workflow service?



  • Tuesday, March 13, 2012 8:16 PM
     
     

    Hello??

    U still can't reproduce it?

  • Wednesday, March 14, 2012 11:51 AM
    Moderator
     
     

    Hi,

    Sorry for delay. I did see the 404 error and redirected page, but I added the service reference successfully. I tried both IIS server and ASP.NET development server. Below is the IIS log:

    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 200 0 0 335
    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx/$metadata - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 400 0 0 310
    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx/_vti_bin/ListData.svc/$metadata - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 302 0 0 333
    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx disco 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 200 0 0 26
    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx wsdl 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 200 0 0 56
    2012-03-14 11:34:16 ::1 POST /Test/Services/Service1.xamlx/mex - 80 - ::1 - 415 0 0 412
    2012-03-14 11:34:16 ::1 POST /Test/Services/Service1.xamlx - 80 - ::1 - 415 0 0 412
    2012-03-14 11:34:16 ::1 GET /Test/default.aspx - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 200 0 0 172
    2012-03-14 11:34:16 ::1 GET /Test/Services/Service1.xamlx xsd=xsd0 80 - ::1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.1) 200 0 0 832

    It appears that Visual Studio tried multiple ways to obtain the metadata. Base on my research, the ListData.svc is used for REST service. It shouldn't cause this issue. Could you please send a sample project to me at: liangliang(dot)tang(at)hotmail.com? Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, March 15, 2012 3:05 PM
     
     

    Thanks for your answer.

    No need to send a sample project to you, cuz you already reproduced the issue what I was talking about.

    Yes, the client added by service reference works fine. This is just matter of error handling.

    I guess my question was unclear.

    What I was asking is to find better error handling...Well..

    The simplest way I could think of something like this...

    ...

    if (hEx.GetHttpCode() == (int)System.Net.HttpStatusCode.NotFound) {

                 // if request.url is like ListData.svc then ignore

                // otherwise send error info and redirect page.

    }

    Just was curious any way that I can avoid to check the page manually like this...

    Thanks,