none
An HTTP Content-Type header is required for SOAP messaging and none was found.

    Question

  •  

    While consuming WCF webservice from another website it is giving the following error.

     

    "An HTTP Content-Type header is required for SOAP messaging and none was found."

     

    Stack Trace:

    System.ServiceModel.ProtocolException was unhandled by user code
      Message="An HTTP Content-Type header is required for SOAP messaging and none was found."
      Source="mscorlib"
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException)
           at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
           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)
           at ServiceReference.IServiceClass.Add(ExplicitNumbers en1, ExplicitNumbers en2)
           at ServiceReference.ServiceClassClient.Add(ExplicitNumbers en1, ExplicitNumbers en2) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\wcfclientwebsite\967b4cc0\7c4a6292\App_WebReferences.mxyp5jrh.0.cs:line 115
           at _Default.Page_Load(Object sender, EventArgs e) in d:\share\Naresh Practice\WCFClientWebsite\Default.aspx.cs:line 30
           at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
           at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
           at System.Web.UI.Control.OnLoad(EventArgs e)
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException: System.Net.WebException
           Message="The remote server returned an error: (500) Internal Server Error."
           Source="System"
           StackTrace:
                at System.Net.HttpWebRequest.GetResponse()
                at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           InnerException:

    please help me...

     

    Thank you,

    Monday, April 21, 2008 10:43 AM

Answers