tags:

views:

51

answers:

1

Hi All,

I have hosted WCF in Windows Server 2003 standard edition.

If there is not much process while fetching data from service it returns expected result, but if there is much processing involved, it comes with 504 error(The server didn't return a response for this request). I am using custom binding which is as follows to return JSONP data

The most irritating thing is when I host same application on Windows server 2003 enterprise edition, It works smoothly.

I am dying to make it work on standard edition.

I will be very grateful if any one can help me to make it work.

A: 

The 504 error denotes a timeout. As the processing is high, the server process might be returning the result beyond the allowed timeout. Can you share your timeout settings? Or review the settings and set them properly.

Set your timeouts like:

   <bindings>
     <basicHttpBinding>
       <binding name="basicHTTP" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00"/>
     </basicHttpBinding>
   </bindings>

You can further see: http://msdn.microsoft.com/en-us/library/ms733051.aspx

Kangkan
Can you please tell me where I need to make timeout settings ?I think i haven't set it yet.
Sanjay Sen
I have added some binding sample. Also added links for further study.
Kangkan
Hi Kangkan,Many thanks for your help, I tried your tips but it didn't work.I am still with the same issue.Any thoughts ?
Sanjay Sen
I have service tag configured like this :<service name="{servicename}"><endpoint address="" behaviorConfiguration="{servicename}AspNetAjaxBehavior"binding="customBinding" bindingConfiguration="jsonpBinding"contract="{contractname}" /> </service>
Sanjay Sen
I added time outs in following manner :<customBinding> <binding name="jsonpBinding" closeTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00" openTimeout="00:01:00"> <jsonpMessageEncoding /> <httpTransport manualAddressing="true" /> </binding> </customBinding>
Sanjay Sen
@Sanjay: I am pretty sure you are setting these on both the server and client side. However I shall request you to compare them.
Kangkan
Can you please tell me what do you mean by client and server side. Apart from web.config, I haven't set it anywhere.
Sanjay Sen
Whenever there is a service, there is a consumer of the service. The service end is the server end and the consumer is the client end in this case. As you are consuming some service, you know where from you are consuming the service. Your windows service will have a app.config and please check for the same.
Kangkan
Kangkan, you become one of my favourites since you really want to get me out of this trouble.I haven't created any windows service for it,It is just hosted in IIS on windows server 2003 standard edition.The main concern is it is very much fine with enterprise(server 2003) and with windows server 2008, but when it comes to standard, I am helpless. There is something wrong for sure.Waiting for your reply and some hint to resolve it.
Sanjay Sen
Sanjay, now I am getting clueless on what I am talking on. You tagged the question on WCF tag. Now if you are using WCF, you can host the service on IIS and you should be having a SVC file to host the service. I think I am on right track till this moment. In case you are using SVC file on IIS, you are also having an associated web.config file. This is the config file on the server side.Now you are connecting to this service from some application. This might be another application on the IIS. This would also have a web.config. This is client side. Please clarify.
Kangkan
Kangkan, Many thanks again for replying.My service is consumed by JMVC application, developed in javascript modal view controller having AJAX action to call API's(svc). Even if I try with fiddler it comes up with 504 error.I again make you remind the problem is while hosting on server 2003 standard edition. Any clue ?
Sanjay Sen
Hello Kangkan,Waiting for your comment on above description.
Sanjay Sen
I dont have knowledge of JMVC. Adding it as a tag. I shall need some time to understand JMVC. Can you pass on some info on it?
Kangkan
Kangkan, We can leave JMVC for time being, only I want is your general idea as it's not working even with fiddler. Apart from which you already told me about time outs settings, there might be something which I am missing at server side configuration or something else you want me to try.I need to resolve it as there is immense pressure on me to make it work.
Sanjay Sen
Can you check whether the call reaches the server side code or not (switch on some logging)? And if reaches, is there any exception on that side? And when actually the call ends on the server side? I hope you have already investigated the windows events for any possible unhandled exceptions. Also, why don't you update your question with the config section details?
Kangkan