.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

ws-addressing 'Action' required message part not signed exception

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :WCF
I have a WCF client calling a Java-based service. The service vendor is supporting WCF clients. The WCF client binding uses authenticationMode="MutualCertificate", messageVersion="Soap11WSAddressing10" and the message is signed and encrypted (SignBeforeEncrypt). WCF, in this case, is automatically signing all the ws-addressing ( <Action>, <MessageID> and <To> ) headers. The message gets to the service and comes back with what appears to be valid encrypted data in the response BUT the client is throwing a "The 'Action', 'http://www.w3.org/2005/08/addressing' required message part was not signed" exception (mscorlib). Questions: Is there a way to NOT sign the ws-addressing headers in the request message while still using both signing and encryption (X.509 certs)? If the client DOES sign the ws-addressing headers in the request, is there a way to configure WCF to accept UNsigned ws-addressing headers in the response? If the answer is NO on both questions, I guess I will have to ask the service vendor to sign the ws-addressing headers in the response. Thanks.

View Complete Post

More Related Resource Links

Action for ultimate recipient is required but not present in the message.


Hi Guys,

I am trying to consume a services that uses wse3 but i keep getting above mentioned error.

I have added the soap message and the wse3policaycache.config if this might help.

I am not sure what i am missing in the soap message ? please help

Soap message


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-0000012c1bf4e337-00000000011258b2-8">
      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>

Faultstring: Action for ultimate recipient is required but not present in the message.


Hi Guys,

I am trying to consume a service ans keep getting the above faultstring.

The web service implementents wse3.0 security and "simple policy".

This is the soap that gets sent:


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext 1.0.xsd">
  <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-0000012c1b7c5cdd-00000000011258b2-2">
  <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">test</wsse:Password>
<tns:AccountTransactionDetail xmlns:tns="http://stagingapiexternal.test.com/">
<!-- Zero or one occurrences -->

Viewmodel property not set to [Required] yet getting error message saying it is?


I have a viewmodel that i use for my view

public int SelectionId{ get; set; }        
public IEnumerable<Selections> Selections { get; set; }

Notice that SelectionId is not decorated with [Required]. In my view, i use DropDownFor like this:

<%= Html.DropDownListFor(m => m.SelectionId, new SelectList(Model.Selections, "Id", "Name"), "--- Select ---")%>

It should be possible to not select anything from the dropdown, resulting in model.SelectionId = 0, which is fine. Why do i get a "SelectionId field is required" error when i Post?  If i do this:

<%= Html.DropDownList(mySelectionId, new SelectList(Model.Selections, "Id", "Name"), "--- Select ---")%>

I no longer get the error if i dont select anything, which is what i want - but no way to bind it to the id if the user does select something

thanks for any help!

Could not find a part of the path ... Occuring even if it's not required

I have a windows application which will be installed on a client PC. However, when the user tries to run the app, an error is thrown up.   Could not find a part of the path "C:\Documents and Settings\$username$\Application Data\$appName folder$\sample_log.txt   I looked in the code..but could not find any reference to the file named sample_log.txt . There's no code that creates this file. Although, I know, we had in the past created this file for testing purposes and then deleted the code.   Thank You    

The formatter threw an exception while trying to deserialize the message

Hi I got this error when programming in C# 2008 The formatter threw an exception when trying to deserialize the message: Error while trying to deserialize parameter http://tempuri.org/:GetListSitesResponse. The InnerException message was' Error on line 1, position 314. The item 'http://tempuri.org/:anyType' contains data data contract 'http://tempuri.org/:Site'. The deserializer has no knowledge of any type that is assigned to this contract. Add the type corresponding to 'Site' to the list of known types (eg, using the attribute KnownTypeAttribute or adding it to the list of known types passed to DataContractSerializer). '. See InnerException for more information. This happen in my button_click event (this is a project on C# 2008 express windows form application) private void button1_Click(object sender, EventArgs e)         {             SiteDevelopmentReference.Service1SoapClient sd = new SiteDevelopmentReference.Service1SoapClient();             listBox1.Items.AddRange(sd.GetListSites().ToArray());                            } I have a service reference from another project

Header for ultimate recipient is required but not present in the message

Hello All-I am getting error message shown below.I am using WSE 3.0/Vs 2005/x509. When my client try to access my webservice, they get error message shown below.Can anyone please help me on this. I am stuch on this issue and can not find a solution anywhere.Feel free to ask me if you have further questions.Thank you very much in adavnce.-Sandip <faultstring>System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: WSE841: An error occured processing an outgoing fault response. ---> System.Web.Services.Protocols.SoapHeaderException: Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message. at Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion.RequireSoapHeaderFilter.ProcessMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope) at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)

Throwinfg Exception from a faulted Message.

Hi I havetransparent proxy that recieves a message from the service. I have to test what happens when the service throws any exception. When I generate the proxy from the "Add Service Reference" from visual studio, it works ok. If I throw a InvalidOperationException on the service it reaches the client with the traditional FaultException. But with my manyally created proxy, it only recieves the faulted messate ( the IsFault attribute is true ) but it does not throw the exception. Here are the exmamples: Host: Contract:   [ServiceContract(Namespace = "http://my.namespace.com")] public interface ICalculadora { [OperationContract] int LancaException(string codigo); }   Service:   public class Service : ICalculadora { public int LancaException(string codigo) { if (codigo == "exception") { throw new InvalidOperationException("Operação ilegal", new DivideByZeroException("Divisão por zero")); } else if (codigo == "numero") { return 32; } else if (codigo == "fault") { InvalidOperationException invEx = new InvalidOperationException("Operacao inválida dentro da faulta"); //throw new FaultException<InvalidOperation

Help!!! WCF:: The formatter threw an exception while trying to deserialize the message

I have[ServiceContract]    public interface IBusiness    {        [OperationContract]        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]        bool UpdateLanguage(int languageId, string name, string code);    }public class Business:IBusiness    {        public bool UpdateLanguage(int languageId, string name, string code)        {           //update to database        }    }Add client:$.ajax({ type: "POST", url: "/Services/Business.svc/UpdateLanguage", data: "{'languageId':'" + languageId + "', " + "'name':'" + name + "'," + "'code':'" + code + "'}", contentType: "application/json; charset=utf-8", dataType: "json", processdata: true, success: function (response) { //rebind data here!

Media Web Part displays "Media failed to load" message.

I am unable to use the Media web part to play a wmv file.  The wmv file (112 KB) is loaded to an asset libray. When I browse to the library and click on Play, I get "Media failed to load" error message. Please help. Thank you, Reggie    

Exception occurs when checking in document with missing required fields

I have a document library with required fields. When the user uploads a document and closes the Properties window without entering the required fields, the document is still uploaded, but is left checked out. If the user subsequently attempts to check in the document without first editing the properties to supply values for those required fields, an exception is thrown and the user sees the following: Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. The Event Log shows the following: Exception message: You must fill out all required properties before checking in this document. Request path: /_layouts/checkin.aspx Stack trace: at Microsoft.SharePoint.ApplicationPages.Checkin.OnLoad(EventArgs e) ... I would like to trap this error and present it to the user or somehow prevent the check-in event from getting far enough to cause this exception. I have tried coding something like this: public override void ItemCheckingIn(SPItemEventProperties properties) {     try     {         base.ItemCheckingIn(properties);     }     catch (SPException ex)     {         properties.Cancel = true;      &n

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

What s the difference of Endpoint Reference and Message Information Header in WS Addressing?

What s the difference of Endpoint Reference and Message Information Header in WS Addressing? Thanks aheadFrank Xu Lei--????,???? ???.NET????????????????????? Focus on Distributed Applications Development and EAI based on .NET   ???????:http://www.frankxulei.com/ ???????:http://www.cnblogs.com/frank_xl/ ??WCF?????? ??WCF??????

RESTful WCF with session required throws exception

Interface code:   [ServiceContract(Namespace="", SessionMode=SessionMode.Required)]   public interface ITestService   {     [WebInvoke(UriTemplate = "",         Method = "POST",         BodyStyle = WebMessageBodyStyle.WrappedRequest)]     [OperationContract]     string ModInit(String arg); ... Service code: [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] public class TestService : ITestService public string ModInit(String arg) ... Startup code: WebServiceHost host = new WebServiceHost(typeof(TestService),    new Uri("http://localhost:10000/test)); ... Client code: Uri address =  new Uri("http://localhost:10000/test"); var factory = new WebChannelFactory<ITestService>(new   WebHttpBinding { AllowCookies = true }, address); ITestService svc = factory.CreateChannel(); string resp = svc.ModInit("test"); ... This code throws a InvalidOperationException: Contract requires Session, but Binding 'WebHttpBinding' doesn't support it ... Does anyone know to get PerSession and SessionMode=SessionMode.Required working in the self hosted code above? Thanks, Mike

how to apply styles on the message displayed by asp.net required field validator control?

 Hi,I want to apply styles on the message (i.e. Name field is required) display by the asp.net required field validator control.Styles=border, padding, background-color, font-color, font-weight, img etcAnd I also want highlight the border or asp.net textbox and asp.net dropdown list with which this control is associated.  RequiredFieldValidator does not have style property !Can anyone let me know how can I do this???Regards,Dazy

WCF Exception "Message security verification failed" only with header!

Hi, I've got a WCF service doing Username authentication. I authenticate with AD and authorize using AzMan on AD. I'm hosting the service in IIS 6 and its running in an app pool that runs in a domain account that has read rights on the AD. I have a custom header that goes both ways. Everything works well until I assign the custom header to return. If I never assign the custom header to return everything is ok but if I do assign the custom header to return I get the error:- Message security verification failed.Duplicate attribute found. Both 'u:Id' and 'u:Id' are from the namespace 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'. Line 1, position 520. I've got service level message tracing and I can see the secure conversation stuff happening and the messages going across the interface.   If anyone has any ideas I'd be most appreciative.   Thanks,   Andy

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?

ASP.net UPS void wsdl error message 'exception has been raised as a result of client data'


exception has been raised as a result of client data. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol

Void shipment erro message; I can't determine how to resolve error.  at ***

The following is the code for ups void shipment wsdl...

protected void wsdlRate()


RateWSs.RateRequest rateReq = new RateRequest();RateWSs.UPSSecurity rateSecurity = new RateWSs.UPSSecurity(); RateWSs.UPSSecurityServiceAccessToken rateToken = new RateWSs.UPSSecurityServiceAccessToken
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