Solution Validation fails

Oct 4, 2009 at 4:24 PM
Edited Oct 4, 2009 at 5:25 PM

Environment:

  • Server 2008;
  • VS 2008 with VSE 1.3.
  • Windows Communication Foundation HTTP Activation is enabled on the server.

 

Please advise why I am receiving this content type error. I copied the following from my log file.

Validating solution ...
Error: 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: '<html>
    <head>
        <title>The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

  ************************************************************************************************

I opened one of the projects, rebuild, and tried to deploy from within Visual Studio, and I receive the same error for each project within the solution

 

------ Deploy started: Project: Microsoft.Practices.SPG.AJAXSupport, Configuration: Debug Any CPU ------
Error: 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: '<html>
    <head>
        <title>The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

  '.

Log file written to:

Oct 5, 2009 at 10:42 AM

Hi datasmithadvtech,

looks like you didnot activate WCF on your server,  you can activate WCF from service manager.

Service Manager--> Add feature-->.net framework 3.0 features-->wcf activation.

 

Thanks

Appaji

 

Oct 5, 2009 at 12:01 PM

thanks, however, this wasn't the case.

 

I managed to solve this. I read some posts that attributed this type of problem to communication error. i think the change i made was to align the bindings with the url that was called i.e. localhost in both cases.

 

As an aside, the cleanup needs to delete the sql server ids that are created. when I re-ran the the install after a cleanup, it didn't work until i manually deleted the sql server ids that were created previously.

 

Feb 3, 2010 at 11:57 AM

Thank you for that.

Sometimes this exception occurrs when there is a version mismatch of your code.

For example you developed a code consuming your WS. The WS was upgraded with new features and your "old" code goes into exception.


Patrick


---------------------------------------------------------------------------------------------------

http://patricklamber.blogspot.com (SharePoint, ASP.NET, PowerShell)

Feb 6, 2013 at 1:07 PM
Hi datasmithadvtech,

I´m facing the same issue and the wcf activation didn´t solve this issue for me. I am not experienced when it comes to devolping, services,... So can you tell me a little more detailed what worked for you?

Thanks
Steffi
Feb 6, 2013 at 1:50 PM
Steffi,

Send me an email to larry@datasmith.biz with your problem details, and i will try to help you.