Click here to Skip to main content
       

ASP.NET

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Credit Card Processing using PaypalmvpRichard MacCutchan28-Nov-12 23:37 
QuestionWeb Applicationmemberjojoba201128-Nov-12 20:39 
Questioniss problem in windoms xpmemberramukdin28-Nov-12 20:11 
SuggestionRe: iss problem in windoms xpmvpRichard MacCutchan28-Nov-12 23:36 
Questioncontrols in ASP.Netmembervani1028-Nov-12 8:28 
AnswerRe: controls in ASP.Netmemberjkirkerx28-Nov-12 12:11 
AnswerRe: controls in ASP.Netmembermark merrens28-Nov-12 12:21 
AnswerRe: controls in ASP.NetmemberCommDev8-Dec-12 22:32 
QuestionMicrosoft Office Excel cannot access the filememberumamahesh202027-Nov-12 23:52 
QuestionhttpModule Type Language Module will not load in Visual Studio debuggermemberRaimundo2a27-Nov-12 22:50 
AnswerRe: httpModule Type Language Module will not load in Visual Studio debuggermvpRichard MacCutchan28-Nov-12 0:10 
GeneralRe: httpModule Type Language Module will not load in Visual Studio debuggermemberRaimundo2a28-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)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)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)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)memberjkirkerx29-Nov-12 10:02 
Questionduplicate insert for no reason!memberJassim Rahma27-Nov-12 10:29 
QuestionError: Could not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer26-Nov-12 19:41 
QuestionCould not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer26-Nov-12 19:38 
AnswerRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberAli Al Omairi(Abu AlHassan)26-Nov-12 20:58 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer26-Nov-12 23:38 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberAli Al Omairi(Abu AlHassan)26-Nov-12 23:54 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer27-Nov-12 0:31 
QuestionASP.NET usefull controlsmemberYoyosch26-Nov-12 19:10 
AnswerRe: ASP.NET usefull controlsmemberbatterybuying27-Nov-12 2:38 
GeneralRe: ASP.NET usefull controlsmembergilvani29-Nov-12 4:37 
AnswerRe: ASP.NET usefull controlsmemberD Waller8-Dec-12 1:43 
QuestionASP MVC update panelmemberYoyosch26-Nov-12 19:04 
AnswerRe: ASP MVC update panelmembergilvani28-Nov-12 2:48 
AnswerRe: ASP MVC update panelmembermayankgupta68828-Nov-12 15:23 
SuggestionIf we click DropDownList items Automatically Select Second DropdownLIst in gridview?memberhemanth sutapalli26-Nov-12 0:44 
GeneralRe: If we click DropDownList items Automatically Select Second DropdownLIst in gridview?memberAli Al Omairi(Abu AlHassan)26-Nov-12 19:21 
GeneralRe: If we click DropDownList items Automatically Select Second DropdownLIst in gridview?memberRobert Bettinelli3-Dec-12 15:25 
QuestionYahoo Wweather: XMLDOCUMENT, XPATHDOCUMENT or ...memberJassim Rahma25-Nov-12 23:12 
QuestionClickonce deploymentmemberkareem olamilekan25-Nov-12 13:07 
AnswerRe: Clickonce deploymentmentorKeith Barrow26-Nov-12 2:40 
Questionwhy it's adding this to the database?!!memberjrahma24-Nov-12 11:16 
AnswerRe: why it's adding this to the database?!!memberjkirkerx24-Nov-12 18:10 
Question(This webpage has a redirect loop) Problemmemberjrahma24-Nov-12 11:05 
AnswerRe: (This webpage has a redirect loop) Problemmemberjkirkerx24-Nov-12 18:21 
SuggestionShould i change my asked question?memberanglo007223-Nov-12 22:29 
GeneralI'm find C# asp.net linkedin sample codememberSerdar Şengül22-Nov-12 21:14 
GeneralRe: I'm find C# asp.net linkedin sample codemvpRichard MacCutchan22-Nov-12 23:57 
GeneralRe: I'm find C# asp.net linkedin sample codememberCommDev8-Dec-12 23:23 
QuestionPaypal Website Payments Standard Integration using NVP [modified]memberZaf Khan22-Nov-12 18:21 
AnswerRe: Paypal Website Payments Standard Integration using NVPmemberjkirkerx24-Nov-12 19:59 
GeneralRe: Paypal Website Payments Standard Integration using NVPmemberZaf Khan24-Nov-12 22:07 
GeneralRe: Paypal Website Payments Standard Integration using NVPmemberjkirkerx25-Nov-12 8:08 
GeneralRe: Paypal Website Payments Standard Integration using NVPmemberZaf Khan25-Nov-12 19:44 
QuestionProblem With List Viewmemberggaurav bhandari22-Nov-12 2:09 

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


Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 18 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid