0
Reply

consuming webservices

Ravi Patel

Ravi Patel

Aug 6 2014 11:06 AM
1.1k

i have created webservices  and  when i am trying to consume from another project but i am getting  following error 

Server Error in '/' Application.

The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
SecureDox
</title><link href="../Assets/Styles/login.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
       /*
       HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
       Uncompressed source: https://github.com/aFarkas/html5shiv
       */
       (function (l, f) {
           function m() { var a = e.elements; return "string" == typeof a ? a.split(" ") : a } function i(a) { var b = n[a[o]]; b || (b = {}, h++, a[o] = h, n[h] = b); return b } function p(a, b, c) { b || (b = f); if (g) return b.createElement(a); c || (c = i(b)); b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a); return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b } function t(a, b) {
               if (!b.ca'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
SecureDox
</title><link href="../Assets/Styles/login.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
       /*
       HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
       Uncompressed source: https://github.com/aFarkas/html5shiv
       */
       (function (l, f) {
           function m() { var a = e.elements; return "string" == typeof a ? a.split(" ") : a } function i(a) { var b = n[a[o]]; b || (b = {}, h++, a[o] = h, n[h] = b); return b } function p(a, b, c) { b || (b = f); if (g) return b.createElement(a); c || (c = i(b)); b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a); return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b } function t(a, b) {
               if (!b.ca'.

Source Error:

Line 249:        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _ Line 250:        Function tblOutBondServicesReference_SxFlowWebServicesSoap_HelloWorld(ByVal request As tblOutBondServicesReference.HelloWorldRequest) As tblOutBondServicesReference.HelloWorldResponse Implements tblOutBondServicesReference.SxFlowWebServicesSoap.HelloWorld Line 251:            Return MyBase.Channel.HelloWorld(request) Line 252:        End Function Line 253:        

Source File: C:\Users\user\Desktop\ravi\demo\test1\test1\Service References\tblOutBondServicesReference\Reference.vb    Line: 251

Stack Trace:

[ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> SecureDox </title><link href="../Assets/Styles/login.css" rel="stylesheet" type="text/css" />     <script type="text/javascript">         /*         HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed         Uncompressed source: https://github.com/aFarkas/html5shiv         */         (function (l, f) {             function m() { var a = e.elements; return "string" == typeof a ? a.split(" ") : a } function i(a) { var b = n[a[o]]; b || (b = {}, h++, a[o] = h, n[h] = b); return b } function p(a, b, c) { b || (b = f); if (g) return b.createElement(a); c || (c = i(b)); b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a); return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b } function t(a, b) {                 if (!b.ca'.]    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10733331    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336    test1.tblOutBondServicesReference.SxFlowWebServicesSoap.HelloWorld(HelloWorldRequest request) +0    test1.tblOutBondServicesReference.SxFlowWebServicesSoapClient.tblOutBondServicesReference_SxFlowWebServicesSoap_HelloWorld(HelloWorldRequest request) in C:\Users\user\Desktop\ravi\demo\test1\test1\Service References\tblOutBondServicesReference\Reference.vb:251    test1.tblOutBondServicesReference.SxFlowWebServicesSoapClient.HelloWorld() in C:\Users\user\Desktop\ravi\demo\test1\test1\Service References\tblOutBondServicesReference\Reference.vb:257    test1.ser.Button1_Click(Object sender, EventArgs e) in C:\Users\user\Desktop\ravi\demo\test1\test1\ser.aspx.vb:27    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9750842    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +196    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408