.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The message version of the outgoing message does not match that of the encoder

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :WCF

Need some help figuring this one out. I need to create a service that based on selected MessageVersion, creates an appropriate binding. Currently, I am only trying to test sending of a Soap11 message, problem is I keep getting the following Exception message and would appreciate some help with it.

The message version of the outgoing message (Soap11 (http://schemas.xmlsoap.org/soap/envelope/) AddressingNone <br/>(http://schemas.microsoft.com/ws/2005/05/addressing/none)) does not match that of the encoder <br/><br/>(Soap12 (http://www.w3.org/2003/05/soap-envelope) Addressing10 (http://www.w3.org/2005/08/addressing)).<br/> Make sure the binding is configured with the same version as the message.

StackTrace = "   at System.ServiceModel.Channels.MessageEncoder.ThrowIfMismatchedMessageVersion<br/>(Message message)\r\n   at System.ServiceModel.Channels.MtomMessageEncoder.WriteMessage<br/>(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset...

The code below is what I have

	CustomBinding basicbinding = new CustomBinding();

		basicbinding.Elements.Add(new MtomMessage

View Complete Post

More Related Resource Links

MessageSecurityException "Identity check failed for outgoing message" when using custom endpointaddr

Hi! I am currently developing a WCF service which will use ASP.NET Membership and RoleProvider as authentication/authorization. I followed the description in on this page http://msdn.microsoft.com/en-us/library/ff647294.aspx to do this, and everything works as expected when I try add a reference to my development service and uses that without any interaction. But, I want to be able to override the enpoint address in code since the server may be placed on other servers, but when I do this in my code (with the same enpointAddress stated in the client wcf file for testing purpose) I get a MessageSecurityException with this information: "Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'localhost' but the remote endpoint provided DNS claim 'MyCert'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity 'MyCert' as the Identity property of EndpointAddress when creating channel proxy." I have search the net for information about this, and found that the only thing I had to do was to add a <dns value="MyCert" /> to my client wcf configuration, and everything should work. But it doesn't, I still get the same error. My server behavior configuration looks like this: <serviceCredentials> <serviceCertificate findValue="CN=MyCert" />

WCF - Java web service interop - Signed outgoing message not accepted

Hi, I try to sign a message using a certificate and a private key to call a java (JBoss) web service, but the server refuses to accept my signed message. It only echoes back the same message that I've sent. I have successfully signed the outgoing message using the certificate, and the structure of the message look alright when I compare it to an exampel message supplied by the web service creator. I use a custom binding declared as shown below <binding name="FSACustomServiceBinding"                  closeTimeout="00:01:00"                  openTimeout="00:01:00"                  receiveTimeout="00:10:00"                  sendTimeout="00:01:00">           <textMessageEncoding             messageVersion="Soap11" />           <security             authenticationMode="MutualCertificate"             requireDerivedKeys="false"             keyEntropyMode="ClientEntropy"        &nb

Windows 7 message at start up:microsoft.net framework version 2.0 is required to continue

It always displays this at start up, which is weird since it has these versions installed. Any suggestions?

outgoing message

workflow i designed do not send out messages to outlook for alert for a responds.where could the fault be from.

WCF returning "The content type text/html of the response message does not match the content type of

I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.

Does anyone have any suggestions on how to solve this probelm?

Here is the error:

The content type text/html of the response message does not match the content type of the binding (application/soap+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">
<meta http-equiv="Content-Type" content=&qu

Creating a custom message encoder for webHttpBinding


I need to strip off the DTD declarations from an incoming XML stream using a custom message encoder.  I'm using a WCF RESTful service to send XML to jQuery/AJAX web pages.

Unfortunately, the <bindings /> section where I added my custom message encoder for removing the DOCTYPE declarations doesn't appear to support custom bindings.  The other binding types (basic for example) do allow for this.

At runtime, I get an exception that says my element is not recognized.  The same element however is picked up fine when placed in a basicHttpBinding.







Question about GZip message encoder



I implemented GZipMessageEncoder from wcf samples into my service. Then i tried to calculate compression multiplier putting measurements in ReadMessage and WriteMessage


            //One of the two main entry points into the encoder. Called by WCF to decode a buffered byte array into a Message.
            public override Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType)
                //Decompress the buffer
                ArraySegment<byte> decompressedBuffer = DecompressBuffer(buffer, bufferManager);

                // my measurement
System.Diagnostics.Debug.WriteLine(String.Format("{0} (r)-> {1}", buffer.Count, decompressedBuffer.Count));

                //Use the inner encoder to decode the decompressed buffer
                Message returnMessage = innerEncoder.ReadMessage(decompressedBuffer, bufferManager);
                returnMessage.Properties.Encoder = 

Message: Integration Services evaluation period has expired. -- version = enterprise??

I have three instances of SQL Server 2008 R2 on a server... two are evaluation versions and one is Enterprise.  We started getting messages in the event log earlier this week indicating that SSIS had expired.  Being that we only use SSIS for production things I assumed that it had mistakenly been installed via the eval media instead of our enterprise media.  I uninstalled it, rebooted, and then re-installed SSIS from our enterprise media.  I am still getting this error message.  How can get make SSIS work again?

Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend