none
Error 504 - ReadResponse() failed: The server did not return a response for this request.

    Question

  • When I call this method from my wcf serivce :

            public override Restaurant[] GetAll()
            {
                return (from c in GetContext().Restaurants orderby c.Name select c).ToArray();
            }

    I get following inner exception :

     {System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
       at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
       at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
       at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
       --- End of inner exception stack trace ---
       at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
       at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)}

     

    But when I call, on the same service, this method :

            public override int Count()
            {
                return GetContext().Restaurants.Count();
            }

    everything works fine ! Can somebody explain that ?


    My company : PurePlexity.com
    Smooth Streaming Demo : High Definition Streaming
    Tuesday, October 26, 2010 6:10 AM

Answers

  • Hi,

    One operation works while the other cause error, it is likely something with that operation(such as the data it returns) result to the problem. Are you using basicHttpBinding or wsHttpBinding, if the http channel is not secured at transportl ayer, you can use fiddler to watch the HTTP request/response to see whether the service has actually send the response data out(determine whether the error occurs at service or when accept data at client).

    #Get Fiddler!
    http://www.fiddler2.com/fiddler2/

    Or you can also turn on the tracing and message logging feature of WCF to inspect the error:

    #Tracing and Message Logging
    http://msdn.microsoft.com/en-us/library/ms751526.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Tuesday, November 02, 2010 9:45 AM
    Wednesday, October 27, 2010 8:29 AM
    Moderator

All replies

  • Hi,

    One operation works while the other cause error, it is likely something with that operation(such as the data it returns) result to the problem. Are you using basicHttpBinding or wsHttpBinding, if the http channel is not secured at transportl ayer, you can use fiddler to watch the HTTP request/response to see whether the service has actually send the response data out(determine whether the error occurs at service or when accept data at client).

    #Get Fiddler!
    http://www.fiddler2.com/fiddler2/

    Or you can also turn on the tracing and message logging feature of WCF to inspect the error:

    #Tracing and Message Logging
    http://msdn.microsoft.com/en-us/library/ms751526.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Tuesday, November 02, 2010 9:45 AM
    Wednesday, October 27, 2010 8:29 AM
    Moderator
  • Recreate Virtual Directory - It worked for me :)
    HydPhani
    Thursday, May 19, 2011 4:01 PM
  • My website operation after a period of time, suddenly appear the mistake:. I see this link:http://social.msdn.microsoft.com/Forums/eu/wcf/thread/d4b29f09-a7de-4db2-b16a-336d91246215, but it can't help me what. My web site is: wrote a few general processing procedures. Ashx, then let the other site through a, jQuery, getJSON call my service, request times, in response to the amount of data has something great, almost 1M data.

    My approach is: to restart the IIS connection pool, cleaning and so on, all these can not solve my problem. Finally, restart the computer, you can. My system is win2003.

    Hope the expert to help me to find the root of the problem, thank you.

    Below is the chinese:

    我的网站运行了一段时间后,突然出现这个错误:。我看到了这个链接:http://social.msdn.microsoft.com/Forums/eu/wcf/thread/d4b29f09-a7de-4db2-b16a-336d91246215  ,但是它不能帮助我什么。  我网站的功能是:写了几个一般处理程序.ashx,然后让别的网站通过,jquery的,getJSON来调用我的服务,请求的次数很多,响应的数据量有事很大,差不多有1M的数据。


    我的处理办法是:重启iis,清理连接池等,这些都不能解决我的问题。 最后,重启了电脑,就可以了。  我的系统是win2003的。


    希望牛人帮我找到问题的根源,谢谢了。

    http://www.camnpr.com 郑州网建 身边的IT专家

    Monday, March 12, 2012 8:29 AM