Server did not recognize the value of HTTP Header SOAPAction

  • Thread starter Nicholas Stamos
  • Start date

N

Nicholas Stamos

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.
 
Ad

Advertisements

N

Nicholas Stamos

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.
 
M

[MSFT]

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.)
 
N

Nicholas Stamos

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.
 
M

[MSFT]

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.)
 
Ad

Advertisements

N

Nicholas Stamos

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.
 
Ad

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top