Server did not recognize the value of HTTP Header SOAPAction

Discussion in 'ASP .Net Web Services' started by Nicholas Stamos, Apr 8, 2004.

  1. Hi,

    I have a problem with my Web Service.

    Every time the IIS worker process hosting the Web Service gets recycled any
    call from a client generates the following exception:



    System.Web.Services.Protocols.SoapException :
    System.Web.Services.Protocols.SoapException: Server did not recognize the
    value of HTTP Header SOAPAction:
    http://www.phaseforward.com/webservices/ecsmproxy/SubmitReport.



    at
    System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()



    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()



    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
    HttpContext context, HttpRequest request, HttpResponse response, Boolean&
    abortProcessing)





    The only way to fix it is to stop IIS and clean the ASP.NET temporary folder
    (%WINDOWS%\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files).



    After that the problem goes away.



    Any ideas?.



    Thanks a lot.
     
    Nicholas Stamos, Apr 8, 2004
    #1
    1. Advertising

  2. One more thing I've just discovered: it is enough to remove hash.web file
    from the ASP.NET temporary folder and restart the IIS.



    My configuration:

    Windows 2003 Server.

    ..NET Framework 1.1

    Microsoft Web Services Enhancements 1.0


    Any ideas?

    Thanks.


    "Nicholas Stamos" <> wrote in message
    news:%...
    > Hi,
    >
    > I have a problem with my Web Service.
    >
    > Every time the IIS worker process hosting the Web Service gets recycled

    any
    > call from a client generates the following exception:
    >
    >
    >
    > System.Web.Services.Protocols.SoapException :
    > System.Web.Services.Protocols.SoapException: Server did not recognize the
    > value of HTTP Header SOAPAction:
    > http://www.phaseforward.com/webservices/ecsmproxy/SubmitReport.
    >
    >
    >
    > at
    > System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    >
    >
    >
    > at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    >
    >
    >
    > at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type

    type,
    > HttpContext context, HttpRequest request, HttpResponse response, Boolean&
    > abortProcessing)
    >
    >
    >
    >
    >
    > The only way to fix it is to stop IIS and clean the ASP.NET temporary

    folder
    > (%WINDOWS%\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files).
    >
    >
    >
    > After that the problem goes away.
    >
    >
    >
    > Any ideas?.
    >
    >
    >
    > Thanks a lot.
    >
    >
    >
    >
     
    Nicholas Stamos, Apr 8, 2004
    #2
    1. Advertising

  3. Nicholas Stamos

    [MSFT] Guest

    Hi Nicholas,

    Noramlly, the exception message:

    Server did not recognize the value of HTTP Header SOAPAction:

    May be related to web service's namespace. Did you have settings like:

    [WebService(Namespace="http://www.contoso.com/")]

    in the web service?

    Additionally, is the problem with all web service on the server?

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    [MSFT], Apr 9, 2004
    #3
  4. Hi,



    Thanks for the response.



    I have the following definition for my web service class:



    [WebService(Namespace="http://www.mycompany.com/webservices/applicationproxy
    ")]

    public class ApplicationProxy : System.Web.Services.WebService





    As I've pointed in my previous messages the Web Service stops working after
    IIS recycles the web service process. I've put a temporary fix in my code. I
    process Application_Start event and clean the ASP.NET cache. The following
    is the code:



    protected void Application_Start(Object sender, EventArgs e)

    {

    //clear ASP.NET cache.



    Regex regex = new Regex(

    @"(?<folder>.*)assembly",

    RegexOptions.IgnoreCase

    | RegexOptions.Multiline

    | RegexOptions.IgnorePatternWhitespace

    | RegexOptions.Compiled

    );



    Match match = regex.Match(
    Assembly.GetExecutingAssembly().Location );

    if ( match.Success )

    {

    FileInfo fileInfo = new FileInfo(
    Path.Combine(match.Result("${folder}"), "hash.web") );

    if ( fileInfo.Exists )

    File.Delete( fileInfo.FullName );

    }

    }



    As you can see I remove just one file: hash.web



    After that everything works perfect.



    Can you suggest some other way around this problem?



    Thanks.





    "[MSFT]" <> wrote in message
    news:...
    > Hi Nicholas,
    >
    > Noramlly, the exception message:
    >
    > Server did not recognize the value of HTTP Header SOAPAction:
    >
    > May be related to web service's namespace. Did you have settings like:
    >
    > [WebService(Namespace="http://www.contoso.com/")]
    >
    > in the web service?
    >
    > Additionally, is the problem with all web service on the server?
    >
    > Luke
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
     
    Nicholas Stamos, Apr 9, 2004
    #4
  5. Nicholas Stamos

    [MSFT] Guest

    Hi Nicholas,

    Hash.web contains some temporary information for the web service. It seems
    it didn't get cleared after recycled.

    You may try to add the following line before the definition of the web
    service class:

    [SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

    The make the web server will locate the correct method by looking at the
    HTTP Request-URI (based on the first child element following the <Body> XML
    element of the SOAP message), rather than the SoapAction HTTP header to
    route the request to the correct method.

    Hope this helps,

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    [MSFT], Apr 12, 2004
    #5
  6. Hi,



    Thanks for the response. I tried it and it seems working, but... I decided
    to verify that if I take the attribute out it stops working. Unfortunately
    at this point it works without attribute as well. I'll try to figure out
    what exactly has changed in my environment.



    Thanks.


    "[MSFT]" <> wrote in message
    news:...
    > Hi Nicholas,
    >
    > Hash.web contains some temporary information for the web service. It seems
    > it didn't get cleared after recycled.
    >
    > You may try to add the following line before the definition of the web
    > service class:
    >
    > [SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]
    >
    > The make the web server will locate the correct method by looking at the
    > HTTP Request-URI (based on the first child element following the <Body>

    XML
    > element of the SOAP message), rather than the SoapAction HTTP header to
    > route the request to the correct method.
    >
    > Hope this helps,
    >
    > Luke
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
     
    Nicholas Stamos, Apr 13, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=

    Server did not recognize the value of HTTP Header SOAPAction

    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=, May 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    28,767
    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=
    May 25, 2007
  2. Juan Rodriguez

    Server did not recognize the value of HTTP Header SOAPAction

    Juan Rodriguez, Aug 28, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    167
    Juan Rodriguez
    Aug 28, 2003
  3. Hazzard
    Replies:
    3
    Views:
    238
    Hazzard
    Sep 13, 2003
  4. Steve Evans
    Replies:
    2
    Views:
    166
    Steve Evans
    Jan 20, 2004
  5. Matt Greer
    Replies:
    2
    Views:
    279
    chriso
    Feb 6, 2004
Loading...

Share This Page