Click here to Skip to main content
15,792,354 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
Hi There,

I have one wcf service and on appliation . I am consuming wcf service into my web site. It works fine locally and on dev server,but when it goes on QA server. We are using proxy class to call the service instead of adding service reference.
One more Thing is it neccessary to add behavior configuration into service we.config file if we are using proxy class.
Below is my SVC we.config file
      <service behaviorConfiguration="" name="FileProcessor">
        <endpoint address=""
                  contract="IFileProcessor" />
          <binding name="Basic_Unsecured" />

Sometimes is works fine but sometime we get below error.
"The server was unable to process the request due to an internal error. For more information about the error; either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client; or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs"
"Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply; MessageFault fault; String action; MessageVersion version; FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation; ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action; Boolean oneway; ProxyOperationRuntime operation; Object[] ins; Object[] outs; TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall; ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg; IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData; Int32 type)"

Cloud you please tell me why I am getting this error intermitantly.
Please help me out

My web.config of Website

        <binding name="BasicHttpBinding" closetimeout="00:10:00" opentimeout="00:10:00" receivetimeout="00:10:00" sendtimeout="00:10:00" allowcookies="false" bypassproxyonlocal="false" hostnamecomparisonmode="StrongWildcard" maxbufferpoolsize="524288" maxreceivedmessagesize="65536" textencoding="utf-8" usedefaultwebproxy="true" messageencoding="Text">
          <security mode="None" />
        <binding name="BasicHttpBinding_IFileProcessor" />
      <endpoint address="" binding="basicHttpBinding" bindingconfiguration="BasicHttpBinding" contract="DMSExport.IFileProcessor" name="BasicHttpBinding_IFileProcessor" />
Updated 14-Jan-16 6:01am
F-ES Sitecore 13-Jan-16 10:27am    
How can we know why your server method is occasionally failing when we don't have access to it and can't see the code? Do as the error explains and enable exception tracing (or use tools like Fiddler to do this) so that you can at least see the exception that is being thrown and that will probably point you in the right direction?
Richard Deeming 13-Jan-16 10:33am    
Fiddler won't help, as the server isn't returning the exception details.

All other points are perfectly valid, though. :)
F-ES Sitecore 13-Jan-16 10:48am    
If you enable tracing it probably will without you having to alter client code...I think that's what I was getting at :)
nira.parmar 14-Jan-16 4:58am    
We are using proxy class to call the service instead of adding service reference
Richard Deeming 14-Jan-16 12:29pm    
Well, you've updated the question, but you STILL haven't enabled tracing, so there is still no way that anyone can help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900