Click here to Skip to main content
12,405,303 members (63,609 online)
   

ASP.NET

 
AnswerRe: controls in ASP.Net Pin
jkirkerx28-Nov-12 12:11
memberjkirkerx28-Nov-12 12:11 
AnswerRe: controls in ASP.Net Pin
mark merrens28-Nov-12 12:21
membermark merrens28-Nov-12 12:21 
AnswerRe: controls in ASP.Net Pin
CommDev8-Dec-12 22:32
memberCommDev8-Dec-12 22:32 
QuestionMicrosoft Office Excel cannot access the file Pin
umamahesh202027-Nov-12 23:52
memberumamahesh202027-Nov-12 23:52 
QuestionhttpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a27-Nov-12 22:50
memberRaimundo2a27-Nov-12 22:50 
AnswerRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Richard MacCutchan28-Nov-12 0:10
mvpRichard MacCutchan28-Nov-12 0:10 
GeneralRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a28-Nov-12 4:16
memberRaimundo2a28-Nov-12 4:16 
QuestionException: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14327-Nov-12 13:35
memberindian14327-Nov-12 13:35 
Hi All,

I have a WCF Service (Ex name: MyWCFService) which has all the database access and business logic mechanism, which is hosted in IIS using BasicHttpBinding. This WCF service is created by me. One of my collegue also created a WCF service called JasonProxyService which consumes MyWCFService, converts the result into Jason and gives it to UI, UI is using Ajax. The JasonProxyservice doesnt have configuration (like in web config it doesnt have elements , etc, which is unusual for me), and this JasonProxyservice has only two files .svc and svc.vb added to an asp.net application which has the UI also (the asp.net application has all the UI and ajax etc). There is no interface for contract, the ServiceContract attribute is defined right on top of the class and the methods in the class are defined with OperationContract attribute on top of them. When I tried to add interace and define it as service contract and put the WCF service configuration in the webconfig file, simply the Ajax isnt working. Then I left that option.
The reason for keeping JasonProxyService and UI in the same project is to avoid cross domain, becuase Ajax doesnt allow cross domain and our organization also not interested in cross domain because of security. The developer who wrote JasonProxyservice has left the project. Now it has come to my plate. This is what the problem is. I am really struggling with it for a while.
For solution, as first step I wrote logger to understand what is the problem, I am getting the below exception, and I am new to the json world. Please help me. Below is my exception, any help would be really helpfull.

System.ServiceModel.ProtocolException: The content type text/html 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 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
 '. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   --- End of inner exception stack trace ---
 
Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
   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 WA.LNI.StayAtWork.Public.Web.StayAtWorkServiceReference.IStayAtWorkService.SetContactInfo(UserInfo userInfo)
   at WA.LNI.StayAtWork.Public.Web.StayAtWorkServiceReference.StayAtWorkServiceClient.SetContactInfo(UserInfo userInfo) in D:\source\SourceCode\StayatWork-VS2010\WA.LNI.StayAtWork.Public.Web\WA.LNI.StayAtWork.Public.Web\Service References\StayAtWorkServiceReference\Reference.vb:line 2848
   at WA.LNI.StayAtWork.Public.Web.JSONProxyService.SetContactInfoJSON(UserInfo dto) in D:\source\SourceCode\StayatWork-VS2010\WA.LNI.StayAtWork.Public.Web\WA.LNI.StayAtWork.Public.Web\JSONProxyService.svc.vb:line 359
Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx28-Nov-12 16:55
memberjkirkerx28-Nov-12 16:55 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14329-Nov-12 7:46
memberindian14329-Nov-12 7:46 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx29-Nov-12 10:02
memberjkirkerx29-Nov-12 10:02 
Questionduplicate insert for no reason! Pin
Jassim Rahma27-Nov-12 10:29
memberJassim Rahma27-Nov-12 10:29 
QuestionError: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:41
memberSuper_Developer26-Nov-12 19:41 
QuestionCould not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:38
memberSuper_Developer26-Nov-12 19:38 
AnswerRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 20:58
memberAli Al Omairi(Abu AlHassan)26-Nov-12 20:58 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 23:38
memberSuper_Developer26-Nov-12 23:38 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 23:54
memberAli Al Omairi(Abu AlHassan)26-Nov-12 23:54 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer27-Nov-12 0:31
memberSuper_Developer27-Nov-12 0:31 
QuestionASP.NET usefull controls Pin
Yoyosch26-Nov-12 19:10
memberYoyosch26-Nov-12 19:10 
AnswerRe: ASP.NET usefull controls Pin
batterybuying27-Nov-12 2:38
memberbatterybuying27-Nov-12 2:38 
GeneralRe: ASP.NET usefull controls Pin
gilvani29-Nov-12 4:37
membergilvani29-Nov-12 4:37 
AnswerRe: ASP.NET usefull controls Pin
D Waller8-Dec-12 1:43
memberD Waller8-Dec-12 1:43 
QuestionASP MVC update panel Pin
Yoyosch26-Nov-12 19:04
memberYoyosch26-Nov-12 19:04 
AnswerRe: ASP MVC update panel Pin
gilvani28-Nov-12 2:48
membergilvani28-Nov-12 2:48 
AnswerRe: ASP MVC update panel Pin
mayankgupta68828-Nov-12 15:23
membermayankgupta68828-Nov-12 15:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 29 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid